<commit_before>package dal

import java.util.UUID
import javax.inject.{Inject, Singleton}

import models.Library
import play.api.db.slick.DatabaseConfigProvider
import slick.driver.JdbcProfile

import scala.concurrent.{ExecutionContext, Future}

@Singleton
class LibraryRepository @Inject()(dbConfigProvider: DatabaseConfigProvider)(implicit ec: ExecutionContext) {
  val dbConfig = dbConfigProvider.get[JdbcProfile]

  import dbConfig._
  import driver.api._

  class Libraries(tag: Tag) extends Table[Library](tag, "library") {
    def uuid = column[UUID]("uuid", O.PrimaryKey)

    def name = column[String]("name")

    def * = (uuid, name) <>
      (Library.tupled, Library.unapply)
  }

  private[dal] val libraries = TableQuery[Libraries]

  def create(library: Library): Future[Library] = db.run {
    libraries += library
  }.map(_ => library)

  def list() = db.stream(libraries.result)
}<commit_msg>LibraryRepository: change stream<commit_after>package dal

import java.util.UUID
import javax.inject.{Inject, Singleton}

import models.Library
import play.api.db.slick.DatabaseConfigProvider
import slick.driver.JdbcProfile

import scala.concurrent.{ExecutionContext, Future}

@Singleton
class LibraryRepository @Inject()(dbConfigProvider: DatabaseConfigProvider)(implicit ec: ExecutionContext) {
  val dbConfig = dbConfigProvider.get[JdbcProfile]

  import dbConfig._
  import driver.api._

  class Libraries(tag: Tag) extends Table[Library](tag, "library") {
    def uuid = column[UUID]("uuid", O.PrimaryKey)

    def name = column[String]("name")

    def * = (uuid, name) <>
      (Library.tupled, Library.unapply)
  }

  private[dal] val libraries = TableQuery[Libraries]

  def create(library: Library): Future[Library] = db.run {
    libraries += library
  }.map(_ => library)

  def list() = db.stream(
    libraries.result.transactionally.withStatementParameters(fetchSize = 1)
  )
}
{'fraction_non_alphanumeric': 0.11882229232386961, 'fraction_numerical': 0.0005257623554153522, 'mean_word_length': 4.891640866873065, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5614157', 'n_tokens_mistral': 584, 'n_tokens_neox': 576, 'n_words': 132}