diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala index 97a5445adf..742b01d597 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala @@ -40,14 +40,14 @@ class PersonRepoImpl extends PersonRepo { } override def insert(unsaved: PersonRowUnsaved): ConnectionIO[PersonRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.one match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""one""""), fr"${fromWrite(value: Long)(Write.fromPut(Meta.LongMeta.put))}::int8")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""one""""), fr"${fromWrite(value: Long)(Write.fromPut(Meta.LongMeta.put))}::int8")) }, unsaved.two match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""two""""), fr"${fromWrite(value: Option[String])(Write.fromPutOption(Meta.StringMeta.put))}")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""two""""), fr"${fromWrite(value: Option[String])(Write.fromPutOption(Meta.StringMeta.put))}")) } ).flatten diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala index db4ba9bc00..80b93c1941 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm213/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala @@ -47,29 +47,29 @@ class PersonRepoImpl extends PersonRepo { } override def insert(unsaved: PersonRowUnsaved): ConnectionIO[PersonRow] = { val fs = List( - Some((Fragment.const(s""""favourite_football_club_id""""), fr"${fromWrite(unsaved.favouriteFootballClubId)(Write.fromPut(FootballClubId.put))}")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""nick_name""""), fr"${fromWrite(unsaved.nickName)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""blog_url""""), fr"${fromWrite(unsaved.blogUrl)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""email""""), fr"${fromWrite(unsaved.email)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""phone""""), fr"${fromWrite(unsaved.phone)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""likes_pizza""""), fr"${fromWrite(unsaved.likesPizza)(Write.fromPut(Meta.BooleanMeta.put))}")), - Some((Fragment.const(s""""work_email""""), fr"${fromWrite(unsaved.workEmail)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""favourite_football_club_id""""), fr"${fromWrite(unsaved.favouriteFootballClubId)(Write.fromPut(FootballClubId.put))}")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""nick_name""""), fr"${fromWrite(unsaved.nickName)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""blog_url""""), fr"${fromWrite(unsaved.blogUrl)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""email""""), fr"${fromWrite(unsaved.email)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""phone""""), fr"${fromWrite(unsaved.phone)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""likes_pizza""""), fr"${fromWrite(unsaved.likesPizza)(Write.fromPut(Meta.BooleanMeta.put))}")), + Some((Fragment.const0(s""""work_email""""), fr"${fromWrite(unsaved.workEmail)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.id match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""id""""), fr"${fromWrite(value: PersonId)(Write.fromPut(PersonId.put))}::int8")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""id""""), fr"${fromWrite(value: PersonId)(Write.fromPut(PersonId.put))}::int8")) }, unsaved.maritalStatusId match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""marital_status_id""""), fr"${fromWrite(value: MaritalStatusId)(Write.fromPut(MaritalStatusId.put))}")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""marital_status_id""""), fr"${fromWrite(value: MaritalStatusId)(Write.fromPut(MaritalStatusId.put))}")) }, unsaved.sector match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""sector""""), fr"${fromWrite(value: Sector)(Write.fromPut(Sector.put))}::myschema.sector")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""sector""""), fr"${fromWrite(value: Sector)(Write.fromPut(Sector.put))}::myschema.sector")) }, unsaved.favoriteNumber match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""favorite_number""""), fr"${fromWrite(value: Number)(Write.fromPut(Number.put))}::myschema.number")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""favorite_number""""), fr"${fromWrite(value: Number)(Write.fromPut(Number.put))}::myschema.number")) } ).flatten diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala index 97a5445adf..742b01d597 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/compositepk/person/PersonRepoImpl.scala @@ -40,14 +40,14 @@ class PersonRepoImpl extends PersonRepo { } override def insert(unsaved: PersonRowUnsaved): ConnectionIO[PersonRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.one match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""one""""), fr"${fromWrite(value: Long)(Write.fromPut(Meta.LongMeta.put))}::int8")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""one""""), fr"${fromWrite(value: Long)(Write.fromPut(Meta.LongMeta.put))}::int8")) }, unsaved.two match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""two""""), fr"${fromWrite(value: Option[String])(Write.fromPutOption(Meta.StringMeta.put))}")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""two""""), fr"${fromWrite(value: Option[String])(Write.fromPutOption(Meta.StringMeta.put))}")) } ).flatten diff --git a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala index db4ba9bc00..80b93c1941 100644 --- a/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala +++ b/.bleep/generated-sources/typo-tester-doobie@jvm3/scripts.GenHardcodedFiles/testdb/hardcoded/myschema/person/PersonRepoImpl.scala @@ -47,29 +47,29 @@ class PersonRepoImpl extends PersonRepo { } override def insert(unsaved: PersonRowUnsaved): ConnectionIO[PersonRow] = { val fs = List( - Some((Fragment.const(s""""favourite_football_club_id""""), fr"${fromWrite(unsaved.favouriteFootballClubId)(Write.fromPut(FootballClubId.put))}")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""nick_name""""), fr"${fromWrite(unsaved.nickName)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""blog_url""""), fr"${fromWrite(unsaved.blogUrl)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""email""""), fr"${fromWrite(unsaved.email)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""phone""""), fr"${fromWrite(unsaved.phone)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""likes_pizza""""), fr"${fromWrite(unsaved.likesPizza)(Write.fromPut(Meta.BooleanMeta.put))}")), - Some((Fragment.const(s""""work_email""""), fr"${fromWrite(unsaved.workEmail)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""favourite_football_club_id""""), fr"${fromWrite(unsaved.favouriteFootballClubId)(Write.fromPut(FootballClubId.put))}")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""nick_name""""), fr"${fromWrite(unsaved.nickName)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""blog_url""""), fr"${fromWrite(unsaved.blogUrl)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""email""""), fr"${fromWrite(unsaved.email)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""phone""""), fr"${fromWrite(unsaved.phone)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""likes_pizza""""), fr"${fromWrite(unsaved.likesPizza)(Write.fromPut(Meta.BooleanMeta.put))}")), + Some((Fragment.const0(s""""work_email""""), fr"${fromWrite(unsaved.workEmail)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.id match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""id""""), fr"${fromWrite(value: PersonId)(Write.fromPut(PersonId.put))}::int8")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""id""""), fr"${fromWrite(value: PersonId)(Write.fromPut(PersonId.put))}::int8")) }, unsaved.maritalStatusId match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""marital_status_id""""), fr"${fromWrite(value: MaritalStatusId)(Write.fromPut(MaritalStatusId.put))}")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""marital_status_id""""), fr"${fromWrite(value: MaritalStatusId)(Write.fromPut(MaritalStatusId.put))}")) }, unsaved.sector match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""sector""""), fr"${fromWrite(value: Sector)(Write.fromPut(Sector.put))}::myschema.sector")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""sector""""), fr"${fromWrite(value: Sector)(Write.fromPut(Sector.put))}::myschema.sector")) }, unsaved.favoriteNumber match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""favorite_number""""), fr"${fromWrite(value: Number)(Write.fromPut(Number.put))}::myschema.number")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""favorite_number""""), fr"${fromWrite(value: Number)(Write.fromPut(Number.put))}::myschema.number")) } ).flatten diff --git a/site/blog/emailaddress/EmailaddressRepoImpl.scala b/site/blog/emailaddress/EmailaddressRepoImpl.scala index 1a784d28a9..14520118a5 100644 --- a/site/blog/emailaddress/EmailaddressRepoImpl.scala +++ b/site/blog/emailaddress/EmailaddressRepoImpl.scala @@ -34,19 +34,19 @@ class EmailaddressRepoImpl extends EmailaddressRepo { } override def insert(unsaved: EmailaddressRowUnsaved): ConnectionIO[EmailaddressRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${unsaved.businessentityid}::int4")), - Some((Fragment.const(s""""emailaddress""""), fr"${unsaved.emailaddress}")), + Some((Fragment.const0(s""""businessentityid""""), fr"${unsaved.businessentityid}::int4")), + Some((Fragment.const0(s""""emailaddress""""), fr"${unsaved.emailaddress}")), unsaved.emailaddressid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""emailaddressid""""), fr"${value: Int}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""emailaddressid""""), fr"${value: Int}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${value: TypoUUID}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${value: TypoUUID}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${value: TypoLocalDateTime}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${value: TypoLocalDateTime}::timestamp")) } ).flatten diff --git a/typo-dsl-doobie/src/scala/typo/dsl/DeleteBuilder.scala b/typo-dsl-doobie/src/scala/typo/dsl/DeleteBuilder.scala index 73f502e982..2b696e77a3 100644 --- a/typo-dsl-doobie/src/scala/typo/dsl/DeleteBuilder.scala +++ b/typo-dsl-doobie/src/scala/typo/dsl/DeleteBuilder.scala @@ -36,7 +36,7 @@ object DeleteBuilder { def mkSql(counter: AtomicInteger): Fragment = { List[Iterable[Fragment]]( - Some(fr"delete from ${Fragment.const(name)}"), + Some(fr"delete from ${Fragment.const0(name)}"), params.where .map(w => w(structure.fields)) .reduceLeftOption(_.and(_)) diff --git a/typo-dsl-doobie/src/scala/typo/dsl/SelectBuilderSql.scala b/typo-dsl-doobie/src/scala/typo/dsl/SelectBuilderSql.scala index 46bc4d26c4..8b01f23ec2 100644 --- a/typo-dsl-doobie/src/scala/typo/dsl/SelectBuilderSql.scala +++ b/typo-dsl-doobie/src/scala/typo/dsl/SelectBuilderSql.scala @@ -61,9 +61,9 @@ object SelectBuilderSql { private def sql(counter: AtomicInteger): Fragment = { val cols = structure.columns - .map(x => Fragment.const(x.sqlReadCast.foldLeft("\"" + x.value + "\"") { case (acc, cast) => s"$acc::$cast" })) - .intercalate(Fragment.const(", ")) - val baseSql = fr"select $cols from ${Fragment.const(name)}" + .map(x => Fragment.const0(x.sqlReadCast.foldLeft("\"" + x.value + "\"") { case (acc, cast) => s"$acc::$cast" })) + .intercalate(Fragment.const0(", ")) + val baseSql = fr"select $cols from ${Fragment.const0(name)}" SelectParams.render(structure.fields, baseSql, counter, params) } @@ -108,16 +108,16 @@ object SelectBuilderSql { case NonEmptyList(one, Nil) => one.sqlFrag case NonEmptyList(first, rest) => val prelude = - fr"""|select ${instance.columns.map(c => Fragment.const(c.value)).intercalate(Fragment.const(", "))} + fr"""|select ${instance.columns.map(c => Fragment.const0(c.value)).intercalate(Fragment.const0(", "))} |from ( |${first.sqlFrag} - |) ${Fragment.const(first.alias)} + |) ${Fragment.const0(first.alias)} |""".stripMargin val joins = rest.map { case SelectBuilderSql.InstantiatedPart(alias, _, sqlFrag, joinFrag) => fr"""|join ( |$sqlFrag - |) ${Fragment.const(alias)} on $joinFrag + |) ${Fragment.const0(alias)} on $joinFrag |""".stripMargin } prelude ++ joins.reduce(_ ++ _) @@ -167,16 +167,16 @@ object SelectBuilderSql { case NonEmptyList(one, Nil) => one.sqlFrag case NonEmptyList(first, rest) => val prelude = - fr"""|select ${fragments.comma(instance.columns.map(c => Fragment.const(c.value)))} + fr"""|select ${fragments.comma(instance.columns.map(c => Fragment.const0(c.value)))} |from ( | ${first.sqlFrag} - |) ${Fragment.const(first.alias)} + |) ${Fragment.const0(first.alias)} |""".stripMargin val joins = rest.map { case SelectBuilderSql.InstantiatedPart(alias, _, sqlFrag, joinFrag) => fr"""|left join ( |${sqlFrag} - |) ${Fragment.const(alias)} on $joinFrag + |) ${Fragment.const0(alias)} on $joinFrag |""".stripMargin } prelude ++ joins.reduce(_ ++ _) diff --git a/typo-dsl-doobie/src/scala/typo/dsl/SqlExpr.scala b/typo-dsl-doobie/src/scala/typo/dsl/SqlExpr.scala index 86f569c688..08873de7f4 100644 --- a/typo-dsl-doobie/src/scala/typo/dsl/SqlExpr.scala +++ b/typo-dsl-doobie/src/scala/typo/dsl/SqlExpr.scala @@ -122,7 +122,7 @@ object SqlExpr { ) extends SqlExpr[T, N, R] with FieldLikeNoHkt[N[T], R] { override def eval(row: R): N[T] = get(row) - override def render(counter: AtomicInteger): Fragment = Fragment.const(value) + override def render(counter: AtomicInteger): Fragment = Fragment.const0(value) } sealed trait FieldLikeNotId[T, N[_], R] extends FieldLike[T, N, R] with FieldLikeNotIdNoHkt[N[T], R] @@ -146,7 +146,7 @@ object SqlExpr { override def render(counter: AtomicInteger): Fragment = { val cast = P match { case _: Put.Basic[_] => Fragment.empty - case p: Put.Advanced[_] => Fragment.const(s"::${p.schemaTypes.head}") + case p: Put.Advanced[_] => Fragment.const0(s"::${p.schemaTypes.head}") } fr"${W.toFragment(value)}$cast" } @@ -168,14 +168,14 @@ object SqlExpr { override def eval(row: R): N[O] = N.mapN(arg1.eval(row))(f.eval) override def render(counter: AtomicInteger): Fragment = - fr"${Fragment.const(f.name)}(${arg1.render(counter)})" + fr"${Fragment.const0(f.name)}(${arg1.render(counter)})" } case class Apply2[T1, T2, O, N1[_], N2[_], N[_], R](f: SqlFunction2[T1, T2, O], arg1: SqlExpr[T1, N1, R], arg2: SqlExpr[T2, N2, R], N: Nullability2[N1, N2, N]) extends SqlExpr[O, N, R] { override def eval(row: R): N[O] = N.mapN(arg1.eval(row), arg2.eval(row))(f.eval) override def render(counter: AtomicInteger): Fragment = - fr"${Fragment.const(f.name)}(${arg1.render(counter)}, ${arg2.render(counter)})" + fr"${Fragment.const0(f.name)}(${arg1.render(counter)}, ${arg2.render(counter)})" } case class Apply3[T1, T2, T3, N1[_], N2[_], N3[_], N[_], O, R]( @@ -188,14 +188,14 @@ object SqlExpr { override def eval(row: R): N[O] = N.mapN(arg1.eval(row), arg2.eval(row), arg3.eval(row))(f.eval) override def render(counter: AtomicInteger): Fragment = - fr"${Fragment.const(f.name)}(${arg1.render(counter)}, ${arg2.render(counter)}, ${arg3.render(counter)})" + fr"${Fragment.const0(f.name)}(${arg1.render(counter)}, ${arg2.render(counter)}, ${arg3.render(counter)})" } case class Binary[T1, T2, O, N1[_], N2[_], N[_], R](left: SqlExpr[T1, N1, R], op: SqlOperator[T1, T2, O], right: SqlExpr[T2, N2, R], N: Nullability2[N1, N2, N]) extends SqlExpr[O, N, R] { override def eval(row: R): N[O] = N.mapN(left.eval(row), right.eval(row))(op.eval) override def render(counter: AtomicInteger): Fragment = - fr"(${left.render(counter)} ${Fragment.const(op.name)} ${right.render(counter)})" + fr"(${left.render(counter)} ${Fragment.const0(op.name)} ${right.render(counter)})" } case class Underlying[T, TT, N[_], R](expr: SqlExpr[T, N, R], bijection: Bijection[T, TT], N: Nullability[N]) extends SqlExpr[TT, N, R] { diff --git a/typo-dsl-doobie/src/scala/typo/dsl/UpdateBuilder.scala b/typo-dsl-doobie/src/scala/typo/dsl/UpdateBuilder.scala index 68f9c115bd..ea277990ea 100644 --- a/typo-dsl-doobie/src/scala/typo/dsl/UpdateBuilder.scala +++ b/typo-dsl-doobie/src/scala/typo/dsl/UpdateBuilder.scala @@ -49,7 +49,7 @@ object UpdateBuilder { def mkSql(counter: AtomicInteger, returning: Boolean): Fragment = { List[Option[Fragment]]( - Some(fr"update ${Fragment.const(name)}"), + Some(fr"update ${Fragment.const0(name)}"), NonEmptyList.fromList(params.setters) match { case None => sys.error("you must specify a columns to set. use `set` method") @@ -57,7 +57,7 @@ object UpdateBuilder { val setFragments = setters.map { setter => val fieldExpr = setter.col(structure.fields) val valueExpr = setter.value(structure.fields) - fr"${fieldExpr.render(counter)} = ${valueExpr.render(counter)}${fieldExpr.sqlWriteCast.fold(Fragment.empty)(cast => Fragment.const(s"::$cast"))}" + fr"${fieldExpr.render(counter)} = ${valueExpr.render(counter)}${fieldExpr.sqlWriteCast.fold(Fragment.empty)(cast => Fragment.const0(s"::$cast"))}" } Some(fragments.set(setFragments)) }, @@ -71,7 +71,7 @@ object UpdateBuilder { if (returning) { val colFragments = fragments.comma( NonEmptyList.fromListUnsafe(structure.columns).map { col => - Fragment.const(col.sqlReadCast.foldLeft("\"" + col.value + "\"") { case (acc, cast) => s"$acc::$cast" }) + Fragment.const0(col.sqlReadCast.foldLeft("\"" + col.value + "\"") { case (acc, cast) => s"$acc::$cast" }) } ) Some(fr"returning $colFragments") diff --git a/typo-tester-anorm/src/scala/adventureworks/production/product/SeekTest.scala b/typo-tester-anorm/src/scala/adventureworks/production/product/SeekTest.scala index 273c5df2c2..3ec412b2d0 100644 --- a/typo-tester-anorm/src/scala/adventureworks/production/product/SeekTest.scala +++ b/typo-tester-anorm/src/scala/adventureworks/production/product/SeekTest.scala @@ -7,9 +7,6 @@ import org.scalatest.funsuite.AnyFunSuite class SeekTest extends AnyFunSuite with TypeCheckedTripleEquals { val productRepo = new ProductRepoImpl - val base = - """select "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text from production.product""" - test("uniform ascending") { val query = productRepo.select .seek(_.name.asc)(Name("foo")) diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala index e6968621cd..1a287e7530 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/department/DepartmentRepoImpl.scala @@ -40,15 +40,15 @@ class DepartmentRepoImpl extends DepartmentRepo { } override def insert(unsaved: DepartmentRowUnsaved): ConnectionIO[DepartmentRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""groupname""""), fr"${fromWrite(unsaved.groupname)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""groupname""""), fr"${fromWrite(unsaved.groupname)(Write.fromPut(Name.put))}::varchar")), unsaved.departmentid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""departmentid""""), fr"${fromWrite(value: DepartmentId)(Write.fromPut(DepartmentId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""departmentid""""), fr"${fromWrite(value: DepartmentId)(Write.fromPut(DepartmentId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala index 23c4a0fab2..f92c807578 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employee/EmployeeRepoImpl.scala @@ -45,41 +45,41 @@ class EmployeeRepoImpl extends EmployeeRepo { } override def insert(unsaved: EmployeeRowUnsaved): ConnectionIO[EmployeeRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""nationalidnumber""""), fr"${fromWrite(unsaved.nationalidnumber)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""loginid""""), fr"${fromWrite(unsaved.loginid)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""jobtitle""""), fr"${fromWrite(unsaved.jobtitle)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""birthdate""""), fr"${fromWrite(unsaved.birthdate)(Write.fromPut(TypoLocalDate.put))}::date")), - Some((Fragment.const(s""""maritalstatus""""), fr"${fromWrite(unsaved.maritalstatus)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""gender""""), fr"${fromWrite(unsaved.gender)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""hiredate""""), fr"${fromWrite(unsaved.hiredate)(Write.fromPut(TypoLocalDate.put))}::date")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""nationalidnumber""""), fr"${fromWrite(unsaved.nationalidnumber)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""loginid""""), fr"${fromWrite(unsaved.loginid)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""jobtitle""""), fr"${fromWrite(unsaved.jobtitle)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""birthdate""""), fr"${fromWrite(unsaved.birthdate)(Write.fromPut(TypoLocalDate.put))}::date")), + Some((Fragment.const0(s""""maritalstatus""""), fr"${fromWrite(unsaved.maritalstatus)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""gender""""), fr"${fromWrite(unsaved.gender)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""hiredate""""), fr"${fromWrite(unsaved.hiredate)(Write.fromPut(TypoLocalDate.put))}::date")), unsaved.salariedflag match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""salariedflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""salariedflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.vacationhours match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""vacationhours""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""vacationhours""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) }, unsaved.sickleavehours match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""sickleavehours""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""sickleavehours""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) }, unsaved.currentflag match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""currentflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""currentflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.organizationnode match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""organizationnode""""), fr"${fromWrite(value: Option[String])(Write.fromPutOption(Meta.StringMeta.put))}")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""organizationnode""""), fr"${fromWrite(value: Option[String])(Write.fromPutOption(Meta.StringMeta.put))}")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala index 09dab2c0b7..567b7c1be1 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeedepartmenthistory/EmployeedepartmenthistoryRepoImpl.scala @@ -52,14 +52,14 @@ class EmployeedepartmenthistoryRepoImpl extends EmployeedepartmenthistoryRepo { } override def insert(unsaved: EmployeedepartmenthistoryRowUnsaved): ConnectionIO[EmployeedepartmenthistoryRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""departmentid""""), fr"${fromWrite(unsaved.departmentid)(Write.fromPut(DepartmentId.put))}::int2")), - Some((Fragment.const(s""""shiftid""""), fr"${fromWrite(unsaved.shiftid)(Write.fromPut(ShiftId.put))}::int2")), - Some((Fragment.const(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDate.put))}::date")), - Some((Fragment.const(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDate.put))}::date")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""departmentid""""), fr"${fromWrite(unsaved.departmentid)(Write.fromPut(DepartmentId.put))}::int2")), + Some((Fragment.const0(s""""shiftid""""), fr"${fromWrite(unsaved.shiftid)(Write.fromPut(ShiftId.put))}::int2")), + Some((Fragment.const0(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDate.put))}::date")), + Some((Fragment.const0(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDate.put))}::date")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala index 2787641a97..e4d294c94a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/employeepayhistory/EmployeepayhistoryRepoImpl.scala @@ -49,13 +49,13 @@ class EmployeepayhistoryRepoImpl extends EmployeepayhistoryRepo { } override def insert(unsaved: EmployeepayhistoryRowUnsaved): ConnectionIO[EmployeepayhistoryRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""ratechangedate""""), fr"${fromWrite(unsaved.ratechangedate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""rate""""), fr"${fromWrite(unsaved.rate)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""payfrequency""""), fr"${fromWrite(unsaved.payfrequency)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""ratechangedate""""), fr"${fromWrite(unsaved.ratechangedate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""rate""""), fr"${fromWrite(unsaved.rate)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""payfrequency""""), fr"${fromWrite(unsaved.payfrequency)(Write.fromPut(TypoShort.put))}::int2")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala index 1bd3f8fc18..5284c26e6c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/jobcandidate/JobcandidateRepoImpl.scala @@ -41,15 +41,15 @@ class JobcandidateRepoImpl extends JobcandidateRepo { } override def insert(unsaved: JobcandidateRowUnsaved): ConnectionIO[JobcandidateRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPutOption(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""resume""""), fr"${fromWrite(unsaved.resume)(Write.fromPutOption(TypoXml.put))}::xml")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPutOption(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""resume""""), fr"${fromWrite(unsaved.resume)(Write.fromPutOption(TypoXml.put))}::xml")), unsaved.jobcandidateid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""jobcandidateid""""), fr"${fromWrite(value: JobcandidateId)(Write.fromPut(JobcandidateId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""jobcandidateid""""), fr"${fromWrite(value: JobcandidateId)(Write.fromPut(JobcandidateId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala index 7d365012d2..57e5bfaf92 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/humanresources/shift/ShiftRepoImpl.scala @@ -41,16 +41,16 @@ class ShiftRepoImpl extends ShiftRepo { } override def insert(unsaved: ShiftRowUnsaved): ConnectionIO[ShiftRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""starttime""""), fr"${fromWrite(unsaved.starttime)(Write.fromPut(TypoLocalTime.put))}::time")), - Some((Fragment.const(s""""endtime""""), fr"${fromWrite(unsaved.endtime)(Write.fromPut(TypoLocalTime.put))}::time")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""starttime""""), fr"${fromWrite(unsaved.starttime)(Write.fromPut(TypoLocalTime.put))}::time")), + Some((Fragment.const0(s""""endtime""""), fr"${fromWrite(unsaved.endtime)(Write.fromPut(TypoLocalTime.put))}::time")), unsaved.shiftid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""shiftid""""), fr"${fromWrite(value: ShiftId)(Write.fromPut(ShiftId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""shiftid""""), fr"${fromWrite(value: ShiftId)(Write.fromPut(ShiftId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala index dbd4011719..68ecf92e23 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/address/AddressRepoImpl.scala @@ -43,23 +43,23 @@ class AddressRepoImpl extends AddressRepo { } override def insert(unsaved: AddressRowUnsaved): ConnectionIO[AddressRow] = { val fs = List( - Some((Fragment.const(s""""addressline1""""), fr"${fromWrite(unsaved.addressline1)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""addressline2""""), fr"${fromWrite(unsaved.addressline2)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""city""""), fr"${fromWrite(unsaved.city)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""stateprovinceid""""), fr"${fromWrite(unsaved.stateprovinceid)(Write.fromPut(StateprovinceId.put))}::int4")), - Some((Fragment.const(s""""postalcode""""), fr"${fromWrite(unsaved.postalcode)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""spatiallocation""""), fr"${fromWrite(unsaved.spatiallocation)(Write.fromPutOption(TypoBytea.put))}::bytea")), + Some((Fragment.const0(s""""addressline1""""), fr"${fromWrite(unsaved.addressline1)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""addressline2""""), fr"${fromWrite(unsaved.addressline2)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""city""""), fr"${fromWrite(unsaved.city)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""stateprovinceid""""), fr"${fromWrite(unsaved.stateprovinceid)(Write.fromPut(StateprovinceId.put))}::int4")), + Some((Fragment.const0(s""""postalcode""""), fr"${fromWrite(unsaved.postalcode)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""spatiallocation""""), fr"${fromWrite(unsaved.spatiallocation)(Write.fromPutOption(TypoBytea.put))}::bytea")), unsaved.addressid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""addressid""""), fr"${fromWrite(value: AddressId)(Write.fromPut(AddressId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""addressid""""), fr"${fromWrite(value: AddressId)(Write.fromPut(AddressId.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala index f9fd5631ff..6903106a03 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/addresstype/AddresstypeRepoImpl.scala @@ -41,18 +41,18 @@ class AddresstypeRepoImpl extends AddresstypeRepo { } override def insert(unsaved: AddresstypeRowUnsaved): ConnectionIO[AddresstypeRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.addresstypeid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""addresstypeid""""), fr"${fromWrite(value: AddresstypeId)(Write.fromPut(AddresstypeId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""addresstypeid""""), fr"${fromWrite(value: AddresstypeId)(Write.fromPut(AddresstypeId.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala index 5ab2a1202e..f0efbba264 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentity/BusinessentityRepoImpl.scala @@ -42,15 +42,15 @@ class BusinessentityRepoImpl extends BusinessentityRepo { val fs = List( unsaved.businessentityid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(value: BusinessentityId)(Write.fromPut(BusinessentityId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(value: BusinessentityId)(Write.fromPut(BusinessentityId.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala index 37b8faf6d0..6b5c39ede2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentityaddress/BusinessentityaddressRepoImpl.scala @@ -51,16 +51,16 @@ class BusinessentityaddressRepoImpl extends BusinessentityaddressRepo { } override def insert(unsaved: BusinessentityaddressRowUnsaved): ConnectionIO[BusinessentityaddressRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""addressid""""), fr"${fromWrite(unsaved.addressid)(Write.fromPut(AddressId.put))}::int4")), - Some((Fragment.const(s""""addresstypeid""""), fr"${fromWrite(unsaved.addresstypeid)(Write.fromPut(AddresstypeId.put))}::int4")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""addressid""""), fr"${fromWrite(unsaved.addressid)(Write.fromPut(AddressId.put))}::int4")), + Some((Fragment.const0(s""""addresstypeid""""), fr"${fromWrite(unsaved.addresstypeid)(Write.fromPut(AddresstypeId.put))}::int4")), unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala index 65b96d7acc..85342187b6 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/businessentitycontact/BusinessentitycontactRepoImpl.scala @@ -50,16 +50,16 @@ class BusinessentitycontactRepoImpl extends BusinessentitycontactRepo { } override def insert(unsaved: BusinessentitycontactRowUnsaved): ConnectionIO[BusinessentitycontactRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""personid""""), fr"${fromWrite(unsaved.personid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""contacttypeid""""), fr"${fromWrite(unsaved.contacttypeid)(Write.fromPut(ContacttypeId.put))}::int4")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""personid""""), fr"${fromWrite(unsaved.personid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""contacttypeid""""), fr"${fromWrite(unsaved.contacttypeid)(Write.fromPut(ContacttypeId.put))}::int4")), unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala index 49f252019e..9b70f69bb7 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/contacttype/ContacttypeRepoImpl.scala @@ -40,14 +40,14 @@ class ContacttypeRepoImpl extends ContacttypeRepo { } override def insert(unsaved: ContacttypeRowUnsaved): ConnectionIO[ContacttypeRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.contacttypeid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""contacttypeid""""), fr"${fromWrite(value: ContacttypeId)(Write.fromPut(ContacttypeId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""contacttypeid""""), fr"${fromWrite(value: ContacttypeId)(Write.fromPut(ContacttypeId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala index cb3c75815d..920daa6e36 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/countryregion/CountryregionRepoImpl.scala @@ -40,11 +40,11 @@ class CountryregionRepoImpl extends CountryregionRepo { } override def insert(unsaved: CountryregionRowUnsaved): ConnectionIO[CountryregionRow] = { val fs = List( - Some((Fragment.const(s""""countryregioncode""""), fr"${fromWrite(unsaved.countryregioncode)(Write.fromPut(CountryregionId.put))}")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""countryregioncode""""), fr"${fromWrite(unsaved.countryregioncode)(Write.fromPut(CountryregionId.put))}")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala index 699cf9cc17..6052d1f2f0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/emailaddress/EmailaddressRepoImpl.scala @@ -49,19 +49,19 @@ class EmailaddressRepoImpl extends EmailaddressRepo { } override def insert(unsaved: EmailaddressRowUnsaved): ConnectionIO[EmailaddressRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""emailaddress""""), fr"${fromWrite(unsaved.emailaddress)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""emailaddress""""), fr"${fromWrite(unsaved.emailaddress)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.emailaddressid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""emailaddressid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""emailaddressid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala index 0e5c969b93..97ae0612d0 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/password/PasswordRepoImpl.scala @@ -42,16 +42,16 @@ class PasswordRepoImpl extends PasswordRepo { } override def insert(unsaved: PasswordRowUnsaved): ConnectionIO[PasswordRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""passwordhash""""), fr"${fromWrite(unsaved.passwordhash)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""passwordsalt""""), fr"${fromWrite(unsaved.passwordsalt)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""passwordhash""""), fr"${fromWrite(unsaved.passwordhash)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""passwordsalt""""), fr"${fromWrite(unsaved.passwordsalt)(Write.fromPut(Meta.StringMeta.put))}")), unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala index 7764d64ca5..67c2319e89 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/person/PersonRepoImpl.scala @@ -46,30 +46,30 @@ class PersonRepoImpl extends PersonRepo { } override def insert(unsaved: PersonRowUnsaved): ConnectionIO[PersonRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""persontype""""), fr"${fromWrite(unsaved.persontype)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""title""""), fr"${fromWrite(unsaved.title)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""firstname""""), fr"${fromWrite(unsaved.firstname)(Write.fromPut(/* user-picked */ FirstName.put))}::varchar")), - Some((Fragment.const(s""""middlename""""), fr"${fromWrite(unsaved.middlename)(Write.fromPutOption(Name.put))}::varchar")), - Some((Fragment.const(s""""lastname""""), fr"${fromWrite(unsaved.lastname)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""suffix""""), fr"${fromWrite(unsaved.suffix)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""additionalcontactinfo""""), fr"${fromWrite(unsaved.additionalcontactinfo)(Write.fromPutOption(TypoXml.put))}::xml")), - Some((Fragment.const(s""""demographics""""), fr"${fromWrite(unsaved.demographics)(Write.fromPutOption(TypoXml.put))}::xml")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""persontype""""), fr"${fromWrite(unsaved.persontype)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""title""""), fr"${fromWrite(unsaved.title)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""firstname""""), fr"${fromWrite(unsaved.firstname)(Write.fromPut(/* user-picked */ FirstName.put))}::varchar")), + Some((Fragment.const0(s""""middlename""""), fr"${fromWrite(unsaved.middlename)(Write.fromPutOption(Name.put))}::varchar")), + Some((Fragment.const0(s""""lastname""""), fr"${fromWrite(unsaved.lastname)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""suffix""""), fr"${fromWrite(unsaved.suffix)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""additionalcontactinfo""""), fr"${fromWrite(unsaved.additionalcontactinfo)(Write.fromPutOption(TypoXml.put))}::xml")), + Some((Fragment.const0(s""""demographics""""), fr"${fromWrite(unsaved.demographics)(Write.fromPutOption(TypoXml.put))}::xml")), unsaved.namestyle match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""namestyle""""), fr"${fromWrite(value: NameStyle)(Write.fromPut(NameStyle.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""namestyle""""), fr"${fromWrite(value: NameStyle)(Write.fromPut(NameStyle.put))}::bool")) }, unsaved.emailpromotion match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""emailpromotion""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""emailpromotion""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala index c201cc2774..a9fecce74e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/personphone/PersonphoneRepoImpl.scala @@ -50,12 +50,12 @@ class PersonphoneRepoImpl extends PersonphoneRepo { } override def insert(unsaved: PersonphoneRowUnsaved): ConnectionIO[PersonphoneRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""phonenumber""""), fr"${fromWrite(unsaved.phonenumber)(Write.fromPut(Phone.put))}::varchar")), - Some((Fragment.const(s""""phonenumbertypeid""""), fr"${fromWrite(unsaved.phonenumbertypeid)(Write.fromPut(PhonenumbertypeId.put))}::int4")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""phonenumber""""), fr"${fromWrite(unsaved.phonenumber)(Write.fromPut(Phone.put))}::varchar")), + Some((Fragment.const0(s""""phonenumbertypeid""""), fr"${fromWrite(unsaved.phonenumbertypeid)(Write.fromPut(PhonenumbertypeId.put))}::int4")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala index 37af00a2cc..c7972999b1 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/phonenumbertype/PhonenumbertypeRepoImpl.scala @@ -40,14 +40,14 @@ class PhonenumbertypeRepoImpl extends PhonenumbertypeRepo { } override def insert(unsaved: PhonenumbertypeRowUnsaved): ConnectionIO[PhonenumbertypeRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.phonenumbertypeid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""phonenumbertypeid""""), fr"${fromWrite(value: PhonenumbertypeId)(Write.fromPut(PhonenumbertypeId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""phonenumbertypeid""""), fr"${fromWrite(value: PhonenumbertypeId)(Write.fromPut(PhonenumbertypeId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala index 050cb44f48..7320523091 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/person/stateprovince/StateprovinceRepoImpl.scala @@ -45,25 +45,25 @@ class StateprovinceRepoImpl extends StateprovinceRepo { } override def insert(unsaved: StateprovinceRowUnsaved): ConnectionIO[StateprovinceRow] = { val fs = List( - Some((Fragment.const(s""""stateprovincecode""""), fr"${fromWrite(unsaved.stateprovincecode)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""countryregioncode""""), fr"${fromWrite(unsaved.countryregioncode)(Write.fromPut(CountryregionId.put))}")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPut(SalesterritoryId.put))}::int4")), + Some((Fragment.const0(s""""stateprovincecode""""), fr"${fromWrite(unsaved.stateprovincecode)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""countryregioncode""""), fr"${fromWrite(unsaved.countryregioncode)(Write.fromPut(CountryregionId.put))}")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPut(SalesterritoryId.put))}::int4")), unsaved.stateprovinceid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""stateprovinceid""""), fr"${fromWrite(value: StateprovinceId)(Write.fromPut(StateprovinceId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""stateprovinceid""""), fr"${fromWrite(value: StateprovinceId)(Write.fromPut(StateprovinceId.put))}::int4")) }, unsaved.isonlystateprovinceflag match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""isonlystateprovinceflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""isonlystateprovinceflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala index e08de00ef0..01c65f7c3c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/billofmaterials/BillofmaterialsRepoImpl.scala @@ -43,26 +43,26 @@ class BillofmaterialsRepoImpl extends BillofmaterialsRepo { } override def insert(unsaved: BillofmaterialsRowUnsaved): ConnectionIO[BillofmaterialsRow] = { val fs = List( - Some((Fragment.const(s""""productassemblyid""""), fr"${fromWrite(unsaved.productassemblyid)(Write.fromPutOption(ProductId.put))}::int4")), - Some((Fragment.const(s""""componentid""""), fr"${fromWrite(unsaved.componentid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""unitmeasurecode""""), fr"${fromWrite(unsaved.unitmeasurecode)(Write.fromPut(UnitmeasureId.put))}::bpchar")), - Some((Fragment.const(s""""bomlevel""""), fr"${fromWrite(unsaved.bomlevel)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""productassemblyid""""), fr"${fromWrite(unsaved.productassemblyid)(Write.fromPutOption(ProductId.put))}::int4")), + Some((Fragment.const0(s""""componentid""""), fr"${fromWrite(unsaved.componentid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""unitmeasurecode""""), fr"${fromWrite(unsaved.unitmeasurecode)(Write.fromPut(UnitmeasureId.put))}::bpchar")), + Some((Fragment.const0(s""""bomlevel""""), fr"${fromWrite(unsaved.bomlevel)(Write.fromPut(TypoShort.put))}::int2")), unsaved.billofmaterialsid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""billofmaterialsid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""billofmaterialsid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.startdate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""startdate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""startdate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.perassemblyqty match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""perassemblyqty""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""perassemblyqty""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala index 7d5eeef1ee..a58da3339a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/culture/CultureRepoImpl.scala @@ -40,11 +40,11 @@ class CultureRepoImpl extends CultureRepo { } override def insert(unsaved: CultureRowUnsaved): ConnectionIO[CultureRow] = { val fs = List( - Some((Fragment.const(s""""cultureid""""), fr"${fromWrite(unsaved.cultureid)(Write.fromPut(CultureId.put))}::bpchar")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""cultureid""""), fr"${fromWrite(unsaved.cultureid)(Write.fromPut(CultureId.put))}::bpchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala index 65077a4f9f..447c9fef23 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/document/DocumentRepoImpl.scala @@ -45,33 +45,33 @@ class DocumentRepoImpl extends DocumentRepo { } override def insert(unsaved: DocumentRowUnsaved): ConnectionIO[DocumentRow] = { val fs = List( - Some((Fragment.const(s""""title""""), fr"${fromWrite(unsaved.title)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""owner""""), fr"${fromWrite(unsaved.owner)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""filename""""), fr"${fromWrite(unsaved.filename)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""fileextension""""), fr"${fromWrite(unsaved.fileextension)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""revision""""), fr"${fromWrite(unsaved.revision)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""status""""), fr"${fromWrite(unsaved.status)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""documentsummary""""), fr"${fromWrite(unsaved.documentsummary)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""document""""), fr"${fromWrite(unsaved.document)(Write.fromPutOption(TypoBytea.put))}::bytea")), + Some((Fragment.const0(s""""title""""), fr"${fromWrite(unsaved.title)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""owner""""), fr"${fromWrite(unsaved.owner)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""filename""""), fr"${fromWrite(unsaved.filename)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""fileextension""""), fr"${fromWrite(unsaved.fileextension)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""revision""""), fr"${fromWrite(unsaved.revision)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""status""""), fr"${fromWrite(unsaved.status)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""documentsummary""""), fr"${fromWrite(unsaved.documentsummary)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""document""""), fr"${fromWrite(unsaved.document)(Write.fromPutOption(TypoBytea.put))}::bytea")), unsaved.folderflag match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""folderflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""folderflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.changenumber match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""changenumber""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""changenumber""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.documentnode match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""documentnode""""), fr"${fromWrite(value: DocumentId)(Write.fromPut(DocumentId.put))}")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""documentnode""""), fr"${fromWrite(value: DocumentId)(Write.fromPut(DocumentId.put))}")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala index 8fd22f8c77..488fb755b5 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/illustration/IllustrationRepoImpl.scala @@ -40,14 +40,14 @@ class IllustrationRepoImpl extends IllustrationRepo { } override def insert(unsaved: IllustrationRowUnsaved): ConnectionIO[IllustrationRow] = { val fs = List( - Some((Fragment.const(s""""diagram""""), fr"${fromWrite(unsaved.diagram)(Write.fromPutOption(TypoXml.put))}::xml")), + Some((Fragment.const0(s""""diagram""""), fr"${fromWrite(unsaved.diagram)(Write.fromPutOption(TypoXml.put))}::xml")), unsaved.illustrationid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""illustrationid""""), fr"${fromWrite(value: IllustrationId)(Write.fromPut(IllustrationId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""illustrationid""""), fr"${fromWrite(value: IllustrationId)(Write.fromPut(IllustrationId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala index da50a674c7..c1d8f5d8f8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/location/LocationRepoImpl.scala @@ -41,22 +41,22 @@ class LocationRepoImpl extends LocationRepo { } override def insert(unsaved: LocationRowUnsaved): ConnectionIO[LocationRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.locationid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""locationid""""), fr"${fromWrite(value: LocationId)(Write.fromPut(LocationId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""locationid""""), fr"${fromWrite(value: LocationId)(Write.fromPut(LocationId.put))}::int4")) }, unsaved.costrate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""costrate""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""costrate""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.availability match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""availability""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""availability""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala index ef709bd162..7e0ad5f73b 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/product/ProductRepoImpl.scala @@ -47,45 +47,45 @@ class ProductRepoImpl extends ProductRepo { } override def insert(unsaved: ProductRowUnsaved): ConnectionIO[ProductRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""productnumber""""), fr"${fromWrite(unsaved.productnumber)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""color""""), fr"${fromWrite(unsaved.color)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""safetystocklevel""""), fr"${fromWrite(unsaved.safetystocklevel)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""reorderpoint""""), fr"${fromWrite(unsaved.reorderpoint)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""standardcost""""), fr"${fromWrite(unsaved.standardcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""listprice""""), fr"${fromWrite(unsaved.listprice)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""size""""), fr"${fromWrite(unsaved.size)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""sizeunitmeasurecode""""), fr"${fromWrite(unsaved.sizeunitmeasurecode)(Write.fromPutOption(UnitmeasureId.put))}::bpchar")), - Some((Fragment.const(s""""weightunitmeasurecode""""), fr"${fromWrite(unsaved.weightunitmeasurecode)(Write.fromPutOption(UnitmeasureId.put))}::bpchar")), - Some((Fragment.const(s""""weight""""), fr"${fromWrite(unsaved.weight)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""daystomanufacture""""), fr"${fromWrite(unsaved.daystomanufacture)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""productline""""), fr"${fromWrite(unsaved.productline)(Write.fromPutOption(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""class""""), fr"${fromWrite(unsaved.`class`)(Write.fromPutOption(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""style""""), fr"${fromWrite(unsaved.style)(Write.fromPutOption(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""productsubcategoryid""""), fr"${fromWrite(unsaved.productsubcategoryid)(Write.fromPutOption(ProductsubcategoryId.put))}::int4")), - Some((Fragment.const(s""""productmodelid""""), fr"${fromWrite(unsaved.productmodelid)(Write.fromPutOption(ProductmodelId.put))}::int4")), - Some((Fragment.const(s""""sellstartdate""""), fr"${fromWrite(unsaved.sellstartdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""sellenddate""""), fr"${fromWrite(unsaved.sellenddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""discontinueddate""""), fr"${fromWrite(unsaved.discontinueddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""productnumber""""), fr"${fromWrite(unsaved.productnumber)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""color""""), fr"${fromWrite(unsaved.color)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""safetystocklevel""""), fr"${fromWrite(unsaved.safetystocklevel)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""reorderpoint""""), fr"${fromWrite(unsaved.reorderpoint)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""standardcost""""), fr"${fromWrite(unsaved.standardcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""listprice""""), fr"${fromWrite(unsaved.listprice)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""size""""), fr"${fromWrite(unsaved.size)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""sizeunitmeasurecode""""), fr"${fromWrite(unsaved.sizeunitmeasurecode)(Write.fromPutOption(UnitmeasureId.put))}::bpchar")), + Some((Fragment.const0(s""""weightunitmeasurecode""""), fr"${fromWrite(unsaved.weightunitmeasurecode)(Write.fromPutOption(UnitmeasureId.put))}::bpchar")), + Some((Fragment.const0(s""""weight""""), fr"${fromWrite(unsaved.weight)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""daystomanufacture""""), fr"${fromWrite(unsaved.daystomanufacture)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""productline""""), fr"${fromWrite(unsaved.productline)(Write.fromPutOption(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""class""""), fr"${fromWrite(unsaved.`class`)(Write.fromPutOption(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""style""""), fr"${fromWrite(unsaved.style)(Write.fromPutOption(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""productsubcategoryid""""), fr"${fromWrite(unsaved.productsubcategoryid)(Write.fromPutOption(ProductsubcategoryId.put))}::int4")), + Some((Fragment.const0(s""""productmodelid""""), fr"${fromWrite(unsaved.productmodelid)(Write.fromPutOption(ProductmodelId.put))}::int4")), + Some((Fragment.const0(s""""sellstartdate""""), fr"${fromWrite(unsaved.sellstartdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""sellenddate""""), fr"${fromWrite(unsaved.sellenddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""discontinueddate""""), fr"${fromWrite(unsaved.discontinueddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), unsaved.productid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""productid""""), fr"${fromWrite(value: ProductId)(Write.fromPut(ProductId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""productid""""), fr"${fromWrite(value: ProductId)(Write.fromPut(ProductId.put))}::int4")) }, unsaved.makeflag match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""makeflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""makeflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.finishedgoodsflag match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""finishedgoodsflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""finishedgoodsflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala index 0a177b3682..39545534f1 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcategory/ProductcategoryRepoImpl.scala @@ -41,18 +41,18 @@ class ProductcategoryRepoImpl extends ProductcategoryRepo { } override def insert(unsaved: ProductcategoryRowUnsaved): ConnectionIO[ProductcategoryRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.productcategoryid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""productcategoryid""""), fr"${fromWrite(value: ProductcategoryId)(Write.fromPut(ProductcategoryId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""productcategoryid""""), fr"${fromWrite(value: ProductcategoryId)(Write.fromPut(ProductcategoryId.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala index c83d184ea3..1f4673f642 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productcosthistory/ProductcosthistoryRepoImpl.scala @@ -48,13 +48,13 @@ class ProductcosthistoryRepoImpl extends ProductcosthistoryRepo { } override def insert(unsaved: ProductcosthistoryRowUnsaved): ConnectionIO[ProductcosthistoryRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""standardcost""""), fr"${fromWrite(unsaved.standardcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""standardcost""""), fr"${fromWrite(unsaved.standardcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala index ba03cc3a5a..f5e5f931cf 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdescription/ProductdescriptionRepoImpl.scala @@ -41,18 +41,18 @@ class ProductdescriptionRepoImpl extends ProductdescriptionRepo { } override def insert(unsaved: ProductdescriptionRowUnsaved): ConnectionIO[ProductdescriptionRow] = { val fs = List( - Some((Fragment.const(s""""description""""), fr"${fromWrite(unsaved.description)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""description""""), fr"${fromWrite(unsaved.description)(Write.fromPut(Meta.StringMeta.put))}")), unsaved.productdescriptionid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""productdescriptionid""""), fr"${fromWrite(value: ProductdescriptionId)(Write.fromPut(ProductdescriptionId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""productdescriptionid""""), fr"${fromWrite(value: ProductdescriptionId)(Write.fromPut(ProductdescriptionId.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala index 08ae404a25..df2cda2f90 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productdocument/ProductdocumentRepoImpl.scala @@ -48,14 +48,14 @@ class ProductdocumentRepoImpl extends ProductdocumentRepo { } override def insert(unsaved: ProductdocumentRowUnsaved): ConnectionIO[ProductdocumentRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.documentnode match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""documentnode""""), fr"${fromWrite(value: DocumentId)(Write.fromPut(DocumentId.put))}")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""documentnode""""), fr"${fromWrite(value: DocumentId)(Write.fromPut(DocumentId.put))}")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala index 618630b39e..72c2db629e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productinventory/ProductinventoryRepoImpl.scala @@ -51,21 +51,21 @@ class ProductinventoryRepoImpl extends ProductinventoryRepo { } override def insert(unsaved: ProductinventoryRowUnsaved): ConnectionIO[ProductinventoryRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""locationid""""), fr"${fromWrite(unsaved.locationid)(Write.fromPut(LocationId.put))}::int2")), - Some((Fragment.const(s""""shelf""""), fr"${fromWrite(unsaved.shelf)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""bin""""), fr"${fromWrite(unsaved.bin)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""locationid""""), fr"${fromWrite(unsaved.locationid)(Write.fromPut(LocationId.put))}::int2")), + Some((Fragment.const0(s""""shelf""""), fr"${fromWrite(unsaved.shelf)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""bin""""), fr"${fromWrite(unsaved.bin)(Write.fromPut(TypoShort.put))}::int2")), unsaved.quantity match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""quantity""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""quantity""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala index 42c9f2e62e..8db559386e 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productlistpricehistory/ProductlistpricehistoryRepoImpl.scala @@ -48,13 +48,13 @@ class ProductlistpricehistoryRepoImpl extends ProductlistpricehistoryRepo { } override def insert(unsaved: ProductlistpricehistoryRowUnsaved): ConnectionIO[ProductlistpricehistoryRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""listprice""""), fr"${fromWrite(unsaved.listprice)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""listprice""""), fr"${fromWrite(unsaved.listprice)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala index ecc769372b..ffce7940fa 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodel/ProductmodelRepoImpl.scala @@ -42,20 +42,20 @@ class ProductmodelRepoImpl extends ProductmodelRepo { } override def insert(unsaved: ProductmodelRowUnsaved): ConnectionIO[ProductmodelRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""catalogdescription""""), fr"${fromWrite(unsaved.catalogdescription)(Write.fromPutOption(TypoXml.put))}::xml")), - Some((Fragment.const(s""""instructions""""), fr"${fromWrite(unsaved.instructions)(Write.fromPutOption(TypoXml.put))}::xml")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""catalogdescription""""), fr"${fromWrite(unsaved.catalogdescription)(Write.fromPutOption(TypoXml.put))}::xml")), + Some((Fragment.const0(s""""instructions""""), fr"${fromWrite(unsaved.instructions)(Write.fromPutOption(TypoXml.put))}::xml")), unsaved.productmodelid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""productmodelid""""), fr"${fromWrite(value: ProductmodelId)(Write.fromPut(ProductmodelId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""productmodelid""""), fr"${fromWrite(value: ProductmodelId)(Write.fromPut(ProductmodelId.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala index 41274aaac8..e70731460a 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelillustration/ProductmodelillustrationRepoImpl.scala @@ -48,11 +48,11 @@ class ProductmodelillustrationRepoImpl extends ProductmodelillustrationRepo { } override def insert(unsaved: ProductmodelillustrationRowUnsaved): ConnectionIO[ProductmodelillustrationRow] = { val fs = List( - Some((Fragment.const(s""""productmodelid""""), fr"${fromWrite(unsaved.productmodelid)(Write.fromPut(ProductmodelId.put))}::int4")), - Some((Fragment.const(s""""illustrationid""""), fr"${fromWrite(unsaved.illustrationid)(Write.fromPut(IllustrationId.put))}::int4")), + Some((Fragment.const0(s""""productmodelid""""), fr"${fromWrite(unsaved.productmodelid)(Write.fromPut(ProductmodelId.put))}::int4")), + Some((Fragment.const0(s""""illustrationid""""), fr"${fromWrite(unsaved.illustrationid)(Write.fromPut(IllustrationId.put))}::int4")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala index 338454579b..943dbfa152 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productmodelproductdescriptionculture/ProductmodelproductdescriptioncultureRepoImpl.scala @@ -50,12 +50,12 @@ class ProductmodelproductdescriptioncultureRepoImpl extends Productmodelproductd } override def insert(unsaved: ProductmodelproductdescriptioncultureRowUnsaved): ConnectionIO[ProductmodelproductdescriptioncultureRow] = { val fs = List( - Some((Fragment.const(s""""productmodelid""""), fr"${fromWrite(unsaved.productmodelid)(Write.fromPut(ProductmodelId.put))}::int4")), - Some((Fragment.const(s""""productdescriptionid""""), fr"${fromWrite(unsaved.productdescriptionid)(Write.fromPut(ProductdescriptionId.put))}::int4")), - Some((Fragment.const(s""""cultureid""""), fr"${fromWrite(unsaved.cultureid)(Write.fromPut(CultureId.put))}::bpchar")), + Some((Fragment.const0(s""""productmodelid""""), fr"${fromWrite(unsaved.productmodelid)(Write.fromPut(ProductmodelId.put))}::int4")), + Some((Fragment.const0(s""""productdescriptionid""""), fr"${fromWrite(unsaved.productdescriptionid)(Write.fromPut(ProductdescriptionId.put))}::int4")), + Some((Fragment.const0(s""""cultureid""""), fr"${fromWrite(unsaved.cultureid)(Write.fromPut(CultureId.put))}::bpchar")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala index 737f2a4621..fb10e15b04 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productphoto/ProductphotoRepoImpl.scala @@ -41,17 +41,17 @@ class ProductphotoRepoImpl extends ProductphotoRepo { } override def insert(unsaved: ProductphotoRowUnsaved): ConnectionIO[ProductphotoRow] = { val fs = List( - Some((Fragment.const(s""""thumbnailphoto""""), fr"${fromWrite(unsaved.thumbnailphoto)(Write.fromPutOption(TypoBytea.put))}::bytea")), - Some((Fragment.const(s""""thumbnailphotofilename""""), fr"${fromWrite(unsaved.thumbnailphotofilename)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""largephoto""""), fr"${fromWrite(unsaved.largephoto)(Write.fromPutOption(TypoBytea.put))}::bytea")), - Some((Fragment.const(s""""largephotofilename""""), fr"${fromWrite(unsaved.largephotofilename)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""thumbnailphoto""""), fr"${fromWrite(unsaved.thumbnailphoto)(Write.fromPutOption(TypoBytea.put))}::bytea")), + Some((Fragment.const0(s""""thumbnailphotofilename""""), fr"${fromWrite(unsaved.thumbnailphotofilename)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""largephoto""""), fr"${fromWrite(unsaved.largephoto)(Write.fromPutOption(TypoBytea.put))}::bytea")), + Some((Fragment.const0(s""""largephotofilename""""), fr"${fromWrite(unsaved.largephotofilename)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.productphotoid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""productphotoid""""), fr"${fromWrite(value: ProductphotoId)(Write.fromPut(ProductphotoId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""productphotoid""""), fr"${fromWrite(value: ProductphotoId)(Write.fromPut(ProductphotoId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala index f5b239a5fc..57a57afaf1 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productproductphoto/ProductproductphotoRepoImpl.scala @@ -49,15 +49,15 @@ class ProductproductphotoRepoImpl extends ProductproductphotoRepo { } override def insert(unsaved: ProductproductphotoRowUnsaved): ConnectionIO[ProductproductphotoRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""productphotoid""""), fr"${fromWrite(unsaved.productphotoid)(Write.fromPut(ProductphotoId.put))}::int4")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""productphotoid""""), fr"${fromWrite(unsaved.productphotoid)(Write.fromPut(ProductphotoId.put))}::int4")), unsaved.primary match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""primary""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""primary""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala index 060361827c..9bb72aa514 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productreview/ProductreviewRepoImpl.scala @@ -42,22 +42,22 @@ class ProductreviewRepoImpl extends ProductreviewRepo { } override def insert(unsaved: ProductreviewRowUnsaved): ConnectionIO[ProductreviewRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""reviewername""""), fr"${fromWrite(unsaved.reviewername)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""emailaddress""""), fr"${fromWrite(unsaved.emailaddress)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""rating""""), fr"${fromWrite(unsaved.rating)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""comments""""), fr"${fromWrite(unsaved.comments)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""reviewername""""), fr"${fromWrite(unsaved.reviewername)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""emailaddress""""), fr"${fromWrite(unsaved.emailaddress)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""rating""""), fr"${fromWrite(unsaved.rating)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""comments""""), fr"${fromWrite(unsaved.comments)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.productreviewid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""productreviewid""""), fr"${fromWrite(value: ProductreviewId)(Write.fromPut(ProductreviewId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""productreviewid""""), fr"${fromWrite(value: ProductreviewId)(Write.fromPut(ProductreviewId.put))}::int4")) }, unsaved.reviewdate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""reviewdate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""reviewdate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala index 8cd1934288..895d5a4b96 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/productsubcategory/ProductsubcategoryRepoImpl.scala @@ -42,19 +42,19 @@ class ProductsubcategoryRepoImpl extends ProductsubcategoryRepo { } override def insert(unsaved: ProductsubcategoryRowUnsaved): ConnectionIO[ProductsubcategoryRow] = { val fs = List( - Some((Fragment.const(s""""productcategoryid""""), fr"${fromWrite(unsaved.productcategoryid)(Write.fromPut(ProductcategoryId.put))}::int4")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""productcategoryid""""), fr"${fromWrite(unsaved.productcategoryid)(Write.fromPut(ProductcategoryId.put))}::int4")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.productsubcategoryid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""productsubcategoryid""""), fr"${fromWrite(value: ProductsubcategoryId)(Write.fromPut(ProductsubcategoryId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""productsubcategoryid""""), fr"${fromWrite(value: ProductsubcategoryId)(Write.fromPut(ProductsubcategoryId.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala index b9df3985f9..08dd8d1f57 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/scrapreason/ScrapreasonRepoImpl.scala @@ -40,14 +40,14 @@ class ScrapreasonRepoImpl extends ScrapreasonRepo { } override def insert(unsaved: ScrapreasonRowUnsaved): ConnectionIO[ScrapreasonRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.scrapreasonid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""scrapreasonid""""), fr"${fromWrite(value: ScrapreasonId)(Write.fromPut(ScrapreasonId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""scrapreasonid""""), fr"${fromWrite(value: ScrapreasonId)(Write.fromPut(ScrapreasonId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala index 77336a89aa..83252db021 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistory/TransactionhistoryRepoImpl.scala @@ -41,26 +41,26 @@ class TransactionhistoryRepoImpl extends TransactionhistoryRepo { } override def insert(unsaved: TransactionhistoryRowUnsaved): ConnectionIO[TransactionhistoryRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""referenceorderid""""), fr"${fromWrite(unsaved.referenceorderid)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""transactiontype""""), fr"${fromWrite(unsaved.transactiontype)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""quantity""""), fr"${fromWrite(unsaved.quantity)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""actualcost""""), fr"${fromWrite(unsaved.actualcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""referenceorderid""""), fr"${fromWrite(unsaved.referenceorderid)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""transactiontype""""), fr"${fromWrite(unsaved.transactiontype)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""quantity""""), fr"${fromWrite(unsaved.quantity)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""actualcost""""), fr"${fromWrite(unsaved.actualcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.transactionid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""transactionid""""), fr"${fromWrite(value: TransactionhistoryId)(Write.fromPut(TransactionhistoryId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""transactionid""""), fr"${fromWrite(value: TransactionhistoryId)(Write.fromPut(TransactionhistoryId.put))}::int4")) }, unsaved.referenceorderlineid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""referenceorderlineid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""referenceorderlineid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.transactiondate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""transactiondate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""transactiondate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala index e2ccb51b5b..c79c17c4f2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/transactionhistoryarchive/TransactionhistoryarchiveRepoImpl.scala @@ -40,23 +40,23 @@ class TransactionhistoryarchiveRepoImpl extends TransactionhistoryarchiveRepo { } override def insert(unsaved: TransactionhistoryarchiveRowUnsaved): ConnectionIO[TransactionhistoryarchiveRow] = { val fs = List( - Some((Fragment.const(s""""transactionid""""), fr"${fromWrite(unsaved.transactionid)(Write.fromPut(TransactionhistoryarchiveId.put))}::int4")), - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""referenceorderid""""), fr"${fromWrite(unsaved.referenceorderid)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""transactiontype""""), fr"${fromWrite(unsaved.transactiontype)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), - Some((Fragment.const(s""""quantity""""), fr"${fromWrite(unsaved.quantity)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""actualcost""""), fr"${fromWrite(unsaved.actualcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""transactionid""""), fr"${fromWrite(unsaved.transactionid)(Write.fromPut(TransactionhistoryarchiveId.put))}::int4")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""referenceorderid""""), fr"${fromWrite(unsaved.referenceorderid)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""transactiontype""""), fr"${fromWrite(unsaved.transactiontype)(Write.fromPut(Meta.StringMeta.put))}::bpchar")), + Some((Fragment.const0(s""""quantity""""), fr"${fromWrite(unsaved.quantity)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""actualcost""""), fr"${fromWrite(unsaved.actualcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.referenceorderlineid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""referenceorderlineid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""referenceorderlineid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.transactiondate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""transactiondate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""transactiondate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala index 89a5bd2370..4ac62d7c78 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/unitmeasure/UnitmeasureRepoImpl.scala @@ -40,11 +40,11 @@ class UnitmeasureRepoImpl extends UnitmeasureRepo { } override def insert(unsaved: UnitmeasureRowUnsaved): ConnectionIO[UnitmeasureRow] = { val fs = List( - Some((Fragment.const(s""""unitmeasurecode""""), fr"${fromWrite(unsaved.unitmeasurecode)(Write.fromPut(UnitmeasureId.put))}::bpchar")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""unitmeasurecode""""), fr"${fromWrite(unsaved.unitmeasurecode)(Write.fromPut(UnitmeasureId.put))}::bpchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala index 999a7417bf..81dd795484 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorder/WorkorderRepoImpl.scala @@ -43,20 +43,20 @@ class WorkorderRepoImpl extends WorkorderRepo { } override def insert(unsaved: WorkorderRowUnsaved): ConnectionIO[WorkorderRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""orderqty""""), fr"${fromWrite(unsaved.orderqty)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""scrappedqty""""), fr"${fromWrite(unsaved.scrappedqty)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""duedate""""), fr"${fromWrite(unsaved.duedate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""scrapreasonid""""), fr"${fromWrite(unsaved.scrapreasonid)(Write.fromPutOption(ScrapreasonId.put))}::int2")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""orderqty""""), fr"${fromWrite(unsaved.orderqty)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""scrappedqty""""), fr"${fromWrite(unsaved.scrappedqty)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""duedate""""), fr"${fromWrite(unsaved.duedate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""scrapreasonid""""), fr"${fromWrite(unsaved.scrapreasonid)(Write.fromPutOption(ScrapreasonId.put))}::int2")), unsaved.workorderid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""workorderid""""), fr"${fromWrite(value: WorkorderId)(Write.fromPut(WorkorderId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""workorderid""""), fr"${fromWrite(value: WorkorderId)(Write.fromPut(WorkorderId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala index 4ce864e2c1..938e836f6d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/production/workorderrouting/WorkorderroutingRepoImpl.scala @@ -51,20 +51,20 @@ class WorkorderroutingRepoImpl extends WorkorderroutingRepo { } override def insert(unsaved: WorkorderroutingRowUnsaved): ConnectionIO[WorkorderroutingRow] = { val fs = List( - Some((Fragment.const(s""""workorderid""""), fr"${fromWrite(unsaved.workorderid)(Write.fromPut(WorkorderId.put))}::int4")), - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""operationsequence""""), fr"${fromWrite(unsaved.operationsequence)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""locationid""""), fr"${fromWrite(unsaved.locationid)(Write.fromPut(LocationId.put))}::int2")), - Some((Fragment.const(s""""scheduledstartdate""""), fr"${fromWrite(unsaved.scheduledstartdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""scheduledenddate""""), fr"${fromWrite(unsaved.scheduledenddate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""actualstartdate""""), fr"${fromWrite(unsaved.actualstartdate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""actualenddate""""), fr"${fromWrite(unsaved.actualenddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""actualresourcehrs""""), fr"${fromWrite(unsaved.actualresourcehrs)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""plannedcost""""), fr"${fromWrite(unsaved.plannedcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""actualcost""""), fr"${fromWrite(unsaved.actualcost)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""workorderid""""), fr"${fromWrite(unsaved.workorderid)(Write.fromPut(WorkorderId.put))}::int4")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""operationsequence""""), fr"${fromWrite(unsaved.operationsequence)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""locationid""""), fr"${fromWrite(unsaved.locationid)(Write.fromPut(LocationId.put))}::int2")), + Some((Fragment.const0(s""""scheduledstartdate""""), fr"${fromWrite(unsaved.scheduledstartdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""scheduledenddate""""), fr"${fromWrite(unsaved.scheduledenddate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""actualstartdate""""), fr"${fromWrite(unsaved.actualstartdate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""actualenddate""""), fr"${fromWrite(unsaved.actualenddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""actualresourcehrs""""), fr"${fromWrite(unsaved.actualresourcehrs)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""plannedcost""""), fr"${fromWrite(unsaved.plannedcost)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""actualcost""""), fr"${fromWrite(unsaved.actualcost)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala index a2654e47db..c54ae45a2c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/identity_test/IdentityTestRepoImpl.scala @@ -39,10 +39,10 @@ class IdentityTestRepoImpl extends IdentityTestRepo { } override def insert(unsaved: IdentityTestRowUnsaved): ConnectionIO[IdentityTestRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(IdentityTestId.put))}")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(IdentityTestId.put))}")), unsaved.defaultGenerated match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""default_generated""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""default_generated""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala index 7044fa173c..7df717b98c 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/public/users/UsersRepoImpl.scala @@ -41,15 +41,15 @@ class UsersRepoImpl extends UsersRepo { } override def insert(unsaved: UsersRowUnsaved): ConnectionIO[UsersRow] = { val fs = List( - Some((Fragment.const(s""""user_id""""), fr"${fromWrite(unsaved.userId)(Write.fromPut(UsersId.put))}::uuid")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""last_name""""), fr"${fromWrite(unsaved.lastName)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""email""""), fr"${fromWrite(unsaved.email)(Write.fromPut(TypoUnknownCitext.put))}::citext")), - Some((Fragment.const(s""""password""""), fr"${fromWrite(unsaved.password)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""verified_on""""), fr"${fromWrite(unsaved.verifiedOn)(Write.fromPutOption(TypoInstant.put))}::timestamptz")), + Some((Fragment.const0(s""""user_id""""), fr"${fromWrite(unsaved.userId)(Write.fromPut(UsersId.put))}::uuid")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""last_name""""), fr"${fromWrite(unsaved.lastName)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""email""""), fr"${fromWrite(unsaved.email)(Write.fromPut(TypoUnknownCitext.put))}::citext")), + Some((Fragment.const0(s""""password""""), fr"${fromWrite(unsaved.password)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""verified_on""""), fr"${fromWrite(unsaved.verifiedOn)(Write.fromPutOption(TypoInstant.put))}::timestamptz")), unsaved.createdAt match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""created_at""""), fr"${fromWrite(value: TypoInstant)(Write.fromPut(TypoInstant.put))}::timestamptz")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""created_at""""), fr"${fromWrite(value: TypoInstant)(Write.fromPut(TypoInstant.put))}::timestamptz")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala index a1e44cffbe..b72c441973 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/productvendor/ProductvendorRepoImpl.scala @@ -50,19 +50,19 @@ class ProductvendorRepoImpl extends ProductvendorRepo { } override def insert(unsaved: ProductvendorRowUnsaved): ConnectionIO[ProductvendorRow] = { val fs = List( - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""averageleadtime""""), fr"${fromWrite(unsaved.averageleadtime)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""standardprice""""), fr"${fromWrite(unsaved.standardprice)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""lastreceiptcost""""), fr"${fromWrite(unsaved.lastreceiptcost)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""lastreceiptdate""""), fr"${fromWrite(unsaved.lastreceiptdate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""minorderqty""""), fr"${fromWrite(unsaved.minorderqty)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""maxorderqty""""), fr"${fromWrite(unsaved.maxorderqty)(Write.fromPut(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""onorderqty""""), fr"${fromWrite(unsaved.onorderqty)(Write.fromPutOption(Meta.IntMeta.put))}::int4")), - Some((Fragment.const(s""""unitmeasurecode""""), fr"${fromWrite(unsaved.unitmeasurecode)(Write.fromPut(UnitmeasureId.put))}::bpchar")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""averageleadtime""""), fr"${fromWrite(unsaved.averageleadtime)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""standardprice""""), fr"${fromWrite(unsaved.standardprice)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""lastreceiptcost""""), fr"${fromWrite(unsaved.lastreceiptcost)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""lastreceiptdate""""), fr"${fromWrite(unsaved.lastreceiptdate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""minorderqty""""), fr"${fromWrite(unsaved.minorderqty)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""maxorderqty""""), fr"${fromWrite(unsaved.maxorderqty)(Write.fromPut(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""onorderqty""""), fr"${fromWrite(unsaved.onorderqty)(Write.fromPutOption(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""unitmeasurecode""""), fr"${fromWrite(unsaved.unitmeasurecode)(Write.fromPut(UnitmeasureId.put))}::bpchar")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala index 216a91145b..2231f92f45 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/purchaseorderheader/PurchaseorderheaderRepoImpl.scala @@ -43,41 +43,41 @@ class PurchaseorderheaderRepoImpl extends PurchaseorderheaderRepo { } override def insert(unsaved: PurchaseorderheaderRowUnsaved): ConnectionIO[PurchaseorderheaderRow] = { val fs = List( - Some((Fragment.const(s""""employeeid""""), fr"${fromWrite(unsaved.employeeid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""vendorid""""), fr"${fromWrite(unsaved.vendorid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""shipmethodid""""), fr"${fromWrite(unsaved.shipmethodid)(Write.fromPut(ShipmethodId.put))}::int4")), - Some((Fragment.const(s""""shipdate""""), fr"${fromWrite(unsaved.shipdate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""employeeid""""), fr"${fromWrite(unsaved.employeeid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""vendorid""""), fr"${fromWrite(unsaved.vendorid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""shipmethodid""""), fr"${fromWrite(unsaved.shipmethodid)(Write.fromPut(ShipmethodId.put))}::int4")), + Some((Fragment.const0(s""""shipdate""""), fr"${fromWrite(unsaved.shipdate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), unsaved.purchaseorderid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""purchaseorderid""""), fr"${fromWrite(value: PurchaseorderheaderId)(Write.fromPut(PurchaseorderheaderId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""purchaseorderid""""), fr"${fromWrite(value: PurchaseorderheaderId)(Write.fromPut(PurchaseorderheaderId.put))}::int4")) }, unsaved.revisionnumber match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""revisionnumber""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""revisionnumber""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) }, unsaved.status match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""status""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""status""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) }, unsaved.orderdate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""orderdate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""orderdate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.subtotal match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""subtotal""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""subtotal""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.taxamt match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""taxamt""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""taxamt""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.freight match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""freight""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""freight""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala index f7e16c7689..65c02c86cb 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/shipmethod/ShipmethodRepoImpl.scala @@ -42,26 +42,26 @@ class ShipmethodRepoImpl extends ShipmethodRepo { } override def insert(unsaved: ShipmethodRowUnsaved): ConnectionIO[ShipmethodRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.shipmethodid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""shipmethodid""""), fr"${fromWrite(value: ShipmethodId)(Write.fromPut(ShipmethodId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""shipmethodid""""), fr"${fromWrite(value: ShipmethodId)(Write.fromPut(ShipmethodId.put))}::int4")) }, unsaved.shipbase match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""shipbase""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""shipbase""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.shiprate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""shiprate""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""shiprate""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala index 2091ead297..2b2288dc69 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/purchasing/vendor/VendorRepoImpl.scala @@ -45,22 +45,22 @@ class VendorRepoImpl extends VendorRepo { } override def insert(unsaved: VendorRowUnsaved): ConnectionIO[VendorRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""accountnumber""""), fr"${fromWrite(unsaved.accountnumber)(Write.fromPut(AccountNumber.put))}::varchar")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""creditrating""""), fr"${fromWrite(unsaved.creditrating)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""purchasingwebserviceurl""""), fr"${fromWrite(unsaved.purchasingwebserviceurl)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""accountnumber""""), fr"${fromWrite(unsaved.accountnumber)(Write.fromPut(AccountNumber.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""creditrating""""), fr"${fromWrite(unsaved.creditrating)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""purchasingwebserviceurl""""), fr"${fromWrite(unsaved.purchasingwebserviceurl)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.preferredvendorstatus match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""preferredvendorstatus""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""preferredvendorstatus""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.activeflag match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""activeflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""activeflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala index 0d6db11e36..87e4e74af4 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/countryregioncurrency/CountryregioncurrencyRepoImpl.scala @@ -48,11 +48,11 @@ class CountryregioncurrencyRepoImpl extends CountryregioncurrencyRepo { } override def insert(unsaved: CountryregioncurrencyRowUnsaved): ConnectionIO[CountryregioncurrencyRow] = { val fs = List( - Some((Fragment.const(s""""countryregioncode""""), fr"${fromWrite(unsaved.countryregioncode)(Write.fromPut(CountryregionId.put))}")), - Some((Fragment.const(s""""currencycode""""), fr"${fromWrite(unsaved.currencycode)(Write.fromPut(CurrencyId.put))}::bpchar")), + Some((Fragment.const0(s""""countryregioncode""""), fr"${fromWrite(unsaved.countryregioncode)(Write.fromPut(CountryregionId.put))}")), + Some((Fragment.const0(s""""currencycode""""), fr"${fromWrite(unsaved.currencycode)(Write.fromPut(CurrencyId.put))}::bpchar")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala index 6156fbe9b5..1dc0c0d389 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/creditcard/CreditcardRepoImpl.scala @@ -43,17 +43,17 @@ class CreditcardRepoImpl extends CreditcardRepo { } override def insert(unsaved: CreditcardRowUnsaved): ConnectionIO[CreditcardRow] = { val fs = List( - Some((Fragment.const(s""""cardtype""""), fr"${fromWrite(unsaved.cardtype)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""cardnumber""""), fr"${fromWrite(unsaved.cardnumber)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""expmonth""""), fr"${fromWrite(unsaved.expmonth)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""expyear""""), fr"${fromWrite(unsaved.expyear)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""cardtype""""), fr"${fromWrite(unsaved.cardtype)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""cardnumber""""), fr"${fromWrite(unsaved.cardnumber)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""expmonth""""), fr"${fromWrite(unsaved.expmonth)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""expyear""""), fr"${fromWrite(unsaved.expyear)(Write.fromPut(TypoShort.put))}::int2")), unsaved.creditcardid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""creditcardid""""), fr"${fromWrite(value: /* user-picked */ CustomCreditcardId)(Write.fromPut(/* user-picked */ CustomCreditcardId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""creditcardid""""), fr"${fromWrite(value: /* user-picked */ CustomCreditcardId)(Write.fromPut(/* user-picked */ CustomCreditcardId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala index b3a256a3e9..54c8e8d0c3 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currency/CurrencyRepoImpl.scala @@ -40,11 +40,11 @@ class CurrencyRepoImpl extends CurrencyRepo { } override def insert(unsaved: CurrencyRowUnsaved): ConnectionIO[CurrencyRow] = { val fs = List( - Some((Fragment.const(s""""currencycode""""), fr"${fromWrite(unsaved.currencycode)(Write.fromPut(CurrencyId.put))}::bpchar")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""currencycode""""), fr"${fromWrite(unsaved.currencycode)(Write.fromPut(CurrencyId.put))}::bpchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala index 9cc1605022..1e30d60652 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/currencyrate/CurrencyrateRepoImpl.scala @@ -41,18 +41,18 @@ class CurrencyrateRepoImpl extends CurrencyrateRepo { } override def insert(unsaved: CurrencyrateRowUnsaved): ConnectionIO[CurrencyrateRow] = { val fs = List( - Some((Fragment.const(s""""currencyratedate""""), fr"${fromWrite(unsaved.currencyratedate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""fromcurrencycode""""), fr"${fromWrite(unsaved.fromcurrencycode)(Write.fromPut(CurrencyId.put))}::bpchar")), - Some((Fragment.const(s""""tocurrencycode""""), fr"${fromWrite(unsaved.tocurrencycode)(Write.fromPut(CurrencyId.put))}::bpchar")), - Some((Fragment.const(s""""averagerate""""), fr"${fromWrite(unsaved.averagerate)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""endofdayrate""""), fr"${fromWrite(unsaved.endofdayrate)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""currencyratedate""""), fr"${fromWrite(unsaved.currencyratedate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""fromcurrencycode""""), fr"${fromWrite(unsaved.fromcurrencycode)(Write.fromPut(CurrencyId.put))}::bpchar")), + Some((Fragment.const0(s""""tocurrencycode""""), fr"${fromWrite(unsaved.tocurrencycode)(Write.fromPut(CurrencyId.put))}::bpchar")), + Some((Fragment.const0(s""""averagerate""""), fr"${fromWrite(unsaved.averagerate)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""endofdayrate""""), fr"${fromWrite(unsaved.endofdayrate)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.currencyrateid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""currencyrateid""""), fr"${fromWrite(value: CurrencyrateId)(Write.fromPut(CurrencyrateId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""currencyrateid""""), fr"${fromWrite(value: CurrencyrateId)(Write.fromPut(CurrencyrateId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala index 0083482d26..5c18b33cce 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/customer/CustomerRepoImpl.scala @@ -42,20 +42,20 @@ class CustomerRepoImpl extends CustomerRepo { } override def insert(unsaved: CustomerRowUnsaved): ConnectionIO[CustomerRow] = { val fs = List( - Some((Fragment.const(s""""personid""""), fr"${fromWrite(unsaved.personid)(Write.fromPutOption(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""storeid""""), fr"${fromWrite(unsaved.storeid)(Write.fromPutOption(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPutOption(SalesterritoryId.put))}::int4")), + Some((Fragment.const0(s""""personid""""), fr"${fromWrite(unsaved.personid)(Write.fromPutOption(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""storeid""""), fr"${fromWrite(unsaved.storeid)(Write.fromPutOption(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPutOption(SalesterritoryId.put))}::int4")), unsaved.customerid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""customerid""""), fr"${fromWrite(value: CustomerId)(Write.fromPut(CustomerId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""customerid""""), fr"${fromWrite(value: CustomerId)(Write.fromPut(CustomerId.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala index bbf78849df..4fe9f85a06 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/personcreditcard/PersoncreditcardRepoImpl.scala @@ -49,11 +49,11 @@ class PersoncreditcardRepoImpl extends PersoncreditcardRepo { } override def insert(unsaved: PersoncreditcardRowUnsaved): ConnectionIO[PersoncreditcardRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""creditcardid""""), fr"${fromWrite(unsaved.creditcardid)(Write.fromPut(/* user-picked */ CustomCreditcardId.put))}::int4")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""creditcardid""""), fr"${fromWrite(unsaved.creditcardid)(Write.fromPut(/* user-picked */ CustomCreditcardId.put))}::int4")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala index 8f923a269a..6412a597c4 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderdetail/SalesorderdetailRepoImpl.scala @@ -52,27 +52,27 @@ class SalesorderdetailRepoImpl extends SalesorderdetailRepo { } override def insert(unsaved: SalesorderdetailRowUnsaved): ConnectionIO[SalesorderdetailRow] = { val fs = List( - Some((Fragment.const(s""""salesorderid""""), fr"${fromWrite(unsaved.salesorderid)(Write.fromPut(SalesorderheaderId.put))}::int4")), - Some((Fragment.const(s""""carriertrackingnumber""""), fr"${fromWrite(unsaved.carriertrackingnumber)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""orderqty""""), fr"${fromWrite(unsaved.orderqty)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), - Some((Fragment.const(s""""specialofferid""""), fr"${fromWrite(unsaved.specialofferid)(Write.fromPut(SpecialofferId.put))}::int4")), - Some((Fragment.const(s""""unitprice""""), fr"${fromWrite(unsaved.unitprice)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""salesorderid""""), fr"${fromWrite(unsaved.salesorderid)(Write.fromPut(SalesorderheaderId.put))}::int4")), + Some((Fragment.const0(s""""carriertrackingnumber""""), fr"${fromWrite(unsaved.carriertrackingnumber)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""orderqty""""), fr"${fromWrite(unsaved.orderqty)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""specialofferid""""), fr"${fromWrite(unsaved.specialofferid)(Write.fromPut(SpecialofferId.put))}::int4")), + Some((Fragment.const0(s""""unitprice""""), fr"${fromWrite(unsaved.unitprice)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.salesorderdetailid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""salesorderdetailid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""salesorderdetailid""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.unitpricediscount match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""unitpricediscount""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""unitpricediscount""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala index 76a01ae97a..8849fb8e6d 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheader/SalesorderheaderRepoImpl.scala @@ -52,60 +52,60 @@ class SalesorderheaderRepoImpl extends SalesorderheaderRepo { } override def insert(unsaved: SalesorderheaderRowUnsaved): ConnectionIO[SalesorderheaderRow] = { val fs = List( - Some((Fragment.const(s""""duedate""""), fr"${fromWrite(unsaved.duedate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""shipdate""""), fr"${fromWrite(unsaved.shipdate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""purchaseordernumber""""), fr"${fromWrite(unsaved.purchaseordernumber)(Write.fromPutOption(OrderNumber.put))}::varchar")), - Some((Fragment.const(s""""accountnumber""""), fr"${fromWrite(unsaved.accountnumber)(Write.fromPutOption(AccountNumber.put))}::varchar")), - Some((Fragment.const(s""""customerid""""), fr"${fromWrite(unsaved.customerid)(Write.fromPut(CustomerId.put))}::int4")), - Some((Fragment.const(s""""salespersonid""""), fr"${fromWrite(unsaved.salespersonid)(Write.fromPutOption(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPutOption(SalesterritoryId.put))}::int4")), - Some((Fragment.const(s""""billtoaddressid""""), fr"${fromWrite(unsaved.billtoaddressid)(Write.fromPut(AddressId.put))}::int4")), - Some((Fragment.const(s""""shiptoaddressid""""), fr"${fromWrite(unsaved.shiptoaddressid)(Write.fromPut(AddressId.put))}::int4")), - Some((Fragment.const(s""""shipmethodid""""), fr"${fromWrite(unsaved.shipmethodid)(Write.fromPut(ShipmethodId.put))}::int4")), - Some((Fragment.const(s""""creditcardid""""), fr"${fromWrite(unsaved.creditcardid)(Write.fromPutOption(/* user-picked */ CustomCreditcardId.put))}::int4")), - Some((Fragment.const(s""""creditcardapprovalcode""""), fr"${fromWrite(unsaved.creditcardapprovalcode)(Write.fromPutOption(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""currencyrateid""""), fr"${fromWrite(unsaved.currencyrateid)(Write.fromPutOption(CurrencyrateId.put))}::int4")), - Some((Fragment.const(s""""totaldue""""), fr"${fromWrite(unsaved.totaldue)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), - Some((Fragment.const(s""""comment""""), fr"${fromWrite(unsaved.comment)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""duedate""""), fr"${fromWrite(unsaved.duedate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""shipdate""""), fr"${fromWrite(unsaved.shipdate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""purchaseordernumber""""), fr"${fromWrite(unsaved.purchaseordernumber)(Write.fromPutOption(OrderNumber.put))}::varchar")), + Some((Fragment.const0(s""""accountnumber""""), fr"${fromWrite(unsaved.accountnumber)(Write.fromPutOption(AccountNumber.put))}::varchar")), + Some((Fragment.const0(s""""customerid""""), fr"${fromWrite(unsaved.customerid)(Write.fromPut(CustomerId.put))}::int4")), + Some((Fragment.const0(s""""salespersonid""""), fr"${fromWrite(unsaved.salespersonid)(Write.fromPutOption(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPutOption(SalesterritoryId.put))}::int4")), + Some((Fragment.const0(s""""billtoaddressid""""), fr"${fromWrite(unsaved.billtoaddressid)(Write.fromPut(AddressId.put))}::int4")), + Some((Fragment.const0(s""""shiptoaddressid""""), fr"${fromWrite(unsaved.shiptoaddressid)(Write.fromPut(AddressId.put))}::int4")), + Some((Fragment.const0(s""""shipmethodid""""), fr"${fromWrite(unsaved.shipmethodid)(Write.fromPut(ShipmethodId.put))}::int4")), + Some((Fragment.const0(s""""creditcardid""""), fr"${fromWrite(unsaved.creditcardid)(Write.fromPutOption(/* user-picked */ CustomCreditcardId.put))}::int4")), + Some((Fragment.const0(s""""creditcardapprovalcode""""), fr"${fromWrite(unsaved.creditcardapprovalcode)(Write.fromPutOption(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""currencyrateid""""), fr"${fromWrite(unsaved.currencyrateid)(Write.fromPutOption(CurrencyrateId.put))}::int4")), + Some((Fragment.const0(s""""totaldue""""), fr"${fromWrite(unsaved.totaldue)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""comment""""), fr"${fromWrite(unsaved.comment)(Write.fromPutOption(Meta.StringMeta.put))}")), unsaved.salesorderid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""salesorderid""""), fr"${fromWrite(value: SalesorderheaderId)(Write.fromPut(SalesorderheaderId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""salesorderid""""), fr"${fromWrite(value: SalesorderheaderId)(Write.fromPut(SalesorderheaderId.put))}::int4")) }, unsaved.revisionnumber match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""revisionnumber""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""revisionnumber""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) }, unsaved.orderdate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""orderdate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""orderdate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.status match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""status""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""status""""), fr"${fromWrite(value: TypoShort)(Write.fromPut(TypoShort.put))}::int2")) }, unsaved.onlineorderflag match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""onlineorderflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""onlineorderflag""""), fr"${fromWrite(value: Flag)(Write.fromPut(Flag.put))}::bool")) }, unsaved.subtotal match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""subtotal""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""subtotal""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.taxamt match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""taxamt""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""taxamt""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.freight match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""freight""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""freight""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala index 51d2aae860..52dcdb1049 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesorderheadersalesreason/SalesorderheadersalesreasonRepoImpl.scala @@ -48,11 +48,11 @@ class SalesorderheadersalesreasonRepoImpl extends SalesorderheadersalesreasonRep } override def insert(unsaved: SalesorderheadersalesreasonRowUnsaved): ConnectionIO[SalesorderheadersalesreasonRow] = { val fs = List( - Some((Fragment.const(s""""salesorderid""""), fr"${fromWrite(unsaved.salesorderid)(Write.fromPut(SalesorderheaderId.put))}::int4")), - Some((Fragment.const(s""""salesreasonid""""), fr"${fromWrite(unsaved.salesreasonid)(Write.fromPut(SalesreasonId.put))}::int4")), + Some((Fragment.const0(s""""salesorderid""""), fr"${fromWrite(unsaved.salesorderid)(Write.fromPut(SalesorderheaderId.put))}::int4")), + Some((Fragment.const0(s""""salesreasonid""""), fr"${fromWrite(unsaved.salesreasonid)(Write.fromPut(SalesreasonId.put))}::int4")), unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala index 547966b8cc..4f75c59481 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesperson/SalespersonRepoImpl.scala @@ -43,32 +43,32 @@ class SalespersonRepoImpl extends SalespersonRepo { } override def insert(unsaved: SalespersonRowUnsaved): ConnectionIO[SalespersonRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPutOption(SalesterritoryId.put))}::int4")), - Some((Fragment.const(s""""salesquota""""), fr"${fromWrite(unsaved.salesquota)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPutOption(SalesterritoryId.put))}::int4")), + Some((Fragment.const0(s""""salesquota""""), fr"${fromWrite(unsaved.salesquota)(Write.fromPutOption(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.bonus match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""bonus""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""bonus""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.commissionpct match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""commissionpct""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""commissionpct""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.salesytd match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""salesytd""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""salesytd""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.saleslastyear match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""saleslastyear""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""saleslastyear""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala index 30f6ac36cd..a7d71b7910 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salespersonquotahistory/SalespersonquotahistoryRepoImpl.scala @@ -49,16 +49,16 @@ class SalespersonquotahistoryRepoImpl extends SalespersonquotahistoryRepo { } override def insert(unsaved: SalespersonquotahistoryRowUnsaved): ConnectionIO[SalespersonquotahistoryRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""quotadate""""), fr"${fromWrite(unsaved.quotadate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""salesquota""""), fr"${fromWrite(unsaved.salesquota)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""quotadate""""), fr"${fromWrite(unsaved.quotadate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""salesquota""""), fr"${fromWrite(unsaved.salesquota)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")), unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala index 6cc75758bc..17475479b2 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesreason/SalesreasonRepoImpl.scala @@ -40,15 +40,15 @@ class SalesreasonRepoImpl extends SalesreasonRepo { } override def insert(unsaved: SalesreasonRowUnsaved): ConnectionIO[SalesreasonRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""reasontype""""), fr"${fromWrite(unsaved.reasontype)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""reasontype""""), fr"${fromWrite(unsaved.reasontype)(Write.fromPut(Name.put))}::varchar")), unsaved.salesreasonid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""salesreasonid""""), fr"${fromWrite(value: SalesreasonId)(Write.fromPut(SalesreasonId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""salesreasonid""""), fr"${fromWrite(value: SalesreasonId)(Write.fromPut(SalesreasonId.put))}::int4")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala index 5fee3baaef..cf414d28ac 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salestaxrate/SalestaxrateRepoImpl.scala @@ -44,24 +44,24 @@ class SalestaxrateRepoImpl extends SalestaxrateRepo { } override def insert(unsaved: SalestaxrateRowUnsaved): ConnectionIO[SalestaxrateRow] = { val fs = List( - Some((Fragment.const(s""""stateprovinceid""""), fr"${fromWrite(unsaved.stateprovinceid)(Write.fromPut(StateprovinceId.put))}::int4")), - Some((Fragment.const(s""""taxtype""""), fr"${fromWrite(unsaved.taxtype)(Write.fromPut(TypoShort.put))}::int2")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""stateprovinceid""""), fr"${fromWrite(unsaved.stateprovinceid)(Write.fromPut(StateprovinceId.put))}::int4")), + Some((Fragment.const0(s""""taxtype""""), fr"${fromWrite(unsaved.taxtype)(Write.fromPut(TypoShort.put))}::int2")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), unsaved.salestaxrateid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""salestaxrateid""""), fr"${fromWrite(value: SalestaxrateId)(Write.fromPut(SalestaxrateId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""salestaxrateid""""), fr"${fromWrite(value: SalestaxrateId)(Write.fromPut(SalestaxrateId.put))}::int4")) }, unsaved.taxrate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""taxrate""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""taxrate""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala index e3ef754bf3..ca9268c0e4 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritory/SalesterritoryRepoImpl.scala @@ -43,36 +43,36 @@ class SalesterritoryRepoImpl extends SalesterritoryRepo { } override def insert(unsaved: SalesterritoryRowUnsaved): ConnectionIO[SalesterritoryRow] = { val fs = List( - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""countryregioncode""""), fr"${fromWrite(unsaved.countryregioncode)(Write.fromPut(CountryregionId.put))}")), - Some((Fragment.const(s""""group""""), fr"${fromWrite(unsaved.group)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""countryregioncode""""), fr"${fromWrite(unsaved.countryregioncode)(Write.fromPut(CountryregionId.put))}")), + Some((Fragment.const0(s""""group""""), fr"${fromWrite(unsaved.group)(Write.fromPut(Meta.StringMeta.put))}")), unsaved.territoryid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""territoryid""""), fr"${fromWrite(value: SalesterritoryId)(Write.fromPut(SalesterritoryId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""territoryid""""), fr"${fromWrite(value: SalesterritoryId)(Write.fromPut(SalesterritoryId.put))}::int4")) }, unsaved.salesytd match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""salesytd""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""salesytd""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.saleslastyear match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""saleslastyear""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""saleslastyear""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.costytd match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""costytd""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""costytd""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.costlastyear match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""costlastyear""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""costlastyear""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala index 22f1c93f9b..acfda57883 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/salesterritoryhistory/SalesterritoryhistoryRepoImpl.scala @@ -50,17 +50,17 @@ class SalesterritoryhistoryRepoImpl extends SalesterritoryhistoryRepo { } override def insert(unsaved: SalesterritoryhistoryRowUnsaved): ConnectionIO[SalesterritoryhistoryRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPut(SalesterritoryId.put))}::int4")), - Some((Fragment.const(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""territoryid""""), fr"${fromWrite(unsaved.territoryid)(Write.fromPut(SalesterritoryId.put))}::int4")), + Some((Fragment.const0(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPutOption(TypoLocalDateTime.put))}::timestamp")), unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala index 88737a091a..a97979b8b9 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/shoppingcartitem/ShoppingcartitemRepoImpl.scala @@ -41,23 +41,23 @@ class ShoppingcartitemRepoImpl extends ShoppingcartitemRepo { } override def insert(unsaved: ShoppingcartitemRowUnsaved): ConnectionIO[ShoppingcartitemRow] = { val fs = List( - Some((Fragment.const(s""""shoppingcartid""""), fr"${fromWrite(unsaved.shoppingcartid)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""shoppingcartid""""), fr"${fromWrite(unsaved.shoppingcartid)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), unsaved.shoppingcartitemid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""shoppingcartitemid""""), fr"${fromWrite(value: ShoppingcartitemId)(Write.fromPut(ShoppingcartitemId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""shoppingcartitemid""""), fr"${fromWrite(value: ShoppingcartitemId)(Write.fromPut(ShoppingcartitemId.put))}::int4")) }, unsaved.quantity match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""quantity""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""quantity""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.datecreated match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""datecreated""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""datecreated""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala index 89cfc1042a..581558fc84 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialoffer/SpecialofferRepoImpl.scala @@ -41,31 +41,31 @@ class SpecialofferRepoImpl extends SpecialofferRepo { } override def insert(unsaved: SpecialofferRowUnsaved): ConnectionIO[SpecialofferRow] = { val fs = List( - Some((Fragment.const(s""""description""""), fr"${fromWrite(unsaved.description)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""type""""), fr"${fromWrite(unsaved.`type`)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""category""""), fr"${fromWrite(unsaved.category)(Write.fromPut(Meta.StringMeta.put))}")), - Some((Fragment.const(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), - Some((Fragment.const(s""""maxqty""""), fr"${fromWrite(unsaved.maxqty)(Write.fromPutOption(Meta.IntMeta.put))}::int4")), + Some((Fragment.const0(s""""description""""), fr"${fromWrite(unsaved.description)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""type""""), fr"${fromWrite(unsaved.`type`)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""category""""), fr"${fromWrite(unsaved.category)(Write.fromPut(Meta.StringMeta.put))}")), + Some((Fragment.const0(s""""startdate""""), fr"${fromWrite(unsaved.startdate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""enddate""""), fr"${fromWrite(unsaved.enddate)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")), + Some((Fragment.const0(s""""maxqty""""), fr"${fromWrite(unsaved.maxqty)(Write.fromPutOption(Meta.IntMeta.put))}::int4")), unsaved.specialofferid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""specialofferid""""), fr"${fromWrite(value: SpecialofferId)(Write.fromPut(SpecialofferId.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""specialofferid""""), fr"${fromWrite(value: SpecialofferId)(Write.fromPut(SpecialofferId.put))}::int4")) }, unsaved.discountpct match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""discountpct""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""discountpct""""), fr"${fromWrite(value: BigDecimal)(Write.fromPut(Meta.ScalaBigDecimalMeta.put))}::numeric")) }, unsaved.minqty match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""minqty""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""minqty""""), fr"${fromWrite(value: Int)(Write.fromPut(Meta.IntMeta.put))}::int4")) }, unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala index d66bfe61a8..d2f8afaca8 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/specialofferproduct/SpecialofferproductRepoImpl.scala @@ -49,15 +49,15 @@ class SpecialofferproductRepoImpl extends SpecialofferproductRepo { } override def insert(unsaved: SpecialofferproductRowUnsaved): ConnectionIO[SpecialofferproductRow] = { val fs = List( - Some((Fragment.const(s""""specialofferid""""), fr"${fromWrite(unsaved.specialofferid)(Write.fromPut(SpecialofferId.put))}::int4")), - Some((Fragment.const(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), + Some((Fragment.const0(s""""specialofferid""""), fr"${fromWrite(unsaved.specialofferid)(Write.fromPut(SpecialofferId.put))}::int4")), + Some((Fragment.const0(s""""productid""""), fr"${fromWrite(unsaved.productid)(Write.fromPut(ProductId.put))}::int4")), unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala index 5143fb1e06..6f22544a27 100644 --- a/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala +++ b/typo-tester-doobie/generated-and-checked-in/adventureworks/sales/store/StoreRepoImpl.scala @@ -43,17 +43,17 @@ class StoreRepoImpl extends StoreRepo { } override def insert(unsaved: StoreRowUnsaved): ConnectionIO[StoreRow] = { val fs = List( - Some((Fragment.const(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), - Some((Fragment.const(s""""salespersonid""""), fr"${fromWrite(unsaved.salespersonid)(Write.fromPutOption(BusinessentityId.put))}::int4")), - Some((Fragment.const(s""""demographics""""), fr"${fromWrite(unsaved.demographics)(Write.fromPutOption(TypoXml.put))}::xml")), + Some((Fragment.const0(s""""businessentityid""""), fr"${fromWrite(unsaved.businessentityid)(Write.fromPut(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""name""""), fr"${fromWrite(unsaved.name)(Write.fromPut(Name.put))}::varchar")), + Some((Fragment.const0(s""""salespersonid""""), fr"${fromWrite(unsaved.salespersonid)(Write.fromPutOption(BusinessentityId.put))}::int4")), + Some((Fragment.const0(s""""demographics""""), fr"${fromWrite(unsaved.demographics)(Write.fromPutOption(TypoXml.put))}::xml")), unsaved.rowguid match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""rowguid""""), fr"${fromWrite(value: TypoUUID)(Write.fromPut(TypoUUID.put))}::uuid")) }, unsaved.modifieddate match { case Defaulted.UseDefault => None - case Defaulted.Provided(value) => Some((Fragment.const(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) + case Defaulted.Provided(value) => Some((Fragment.const0(s""""modifieddate""""), fr"${fromWrite(value: TypoLocalDateTime)(Write.fromPut(TypoLocalDateTime.put))}::timestamp")) } ).flatten diff --git a/typo-tester-doobie/src/scala/adventureworks/production/product/SeekTest.scala b/typo-tester-doobie/src/scala/adventureworks/production/product/SeekTest.scala index 8751bbcf74..df2d18d7ff 100644 --- a/typo-tester-doobie/src/scala/adventureworks/production/product/SeekTest.scala +++ b/typo-tester-doobie/src/scala/adventureworks/production/product/SeekTest.scala @@ -8,16 +8,13 @@ import typo.dsl.SqlExpr class SeekTest extends AnyFunSuite with TypeCheckedTripleEquals { val productRepo = new ProductRepoImpl - val base = - """select "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text from production.product""" - test("uniform ascending") { val query = productRepo.select .seek(_.name.asc)(Name("foo")) .seek(_.weight.asc)(SqlExpr.asConstOpt(Some(BigDecimal(22.2)))) .seek(_.listprice.asc)(BigDecimal(33.3)) assertResult(query.sql.get.toString)( - s"""Fragment("select "productid" , "name" , "productnumber" , "makeflag" , "finishedgoodsflag" , "color" , "safetystocklevel" , "reorderpoint" , "standardcost" , "listprice" , "size" , "sizeunitmeasurecode" , "weightunitmeasurecode" , "weight" , "daystomanufacture" , "productline" , "class" , "style" , "productsubcategoryid" , "productmodelid" , "sellstartdate"::text , "sellenddate"::text , "discontinueddate"::text , "rowguid" , "modifieddate"::text from production.product WHERE ((name , weight , listprice ) > (? , ? , ? ) ) ORDER BY name ASC , weight ASC , listprice ASC ")""" + s"""Fragment("select "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text from production.product WHERE ((name, weight, listprice) > (? , ? , ? ) ) ORDER BY name ASC , weight ASC , listprice ASC ")""" ) } @@ -27,7 +24,7 @@ class SeekTest extends AnyFunSuite with TypeCheckedTripleEquals { .seek(_.weight.desc)(Some(BigDecimal(22.2))) .seek(_.listprice.desc)(BigDecimal(33.3)) assertResult(query.sql.get.toString)( - s"""Fragment("select "productid" , "name" , "productnumber" , "makeflag" , "finishedgoodsflag" , "color" , "safetystocklevel" , "reorderpoint" , "standardcost" , "listprice" , "size" , "sizeunitmeasurecode" , "weightunitmeasurecode" , "weight" , "daystomanufacture" , "productline" , "class" , "style" , "productsubcategoryid" , "productmodelid" , "sellstartdate"::text , "sellenddate"::text , "discontinueddate"::text , "rowguid" , "modifieddate"::text from production.product WHERE ((name , weight , listprice ) < (? , ? , ? ) ) ORDER BY name DESC , weight DESC , listprice DESC ")""" + s"""Fragment("select "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text from production.product WHERE ((name, weight, listprice) < (? , ? , ? ) ) ORDER BY name DESC , weight DESC , listprice DESC ")""" ) } @@ -37,7 +34,7 @@ class SeekTest extends AnyFunSuite with TypeCheckedTripleEquals { .seek(_.weight.desc)(Some(BigDecimal(22.2))) .seek(_.listprice.desc)(BigDecimal(33.3)) assertResult(query.sql.get.toString)( - s"""Fragment("select "productid" , "name" , "productnumber" , "makeflag" , "finishedgoodsflag" , "color" , "safetystocklevel" , "reorderpoint" , "standardcost" , "listprice" , "size" , "sizeunitmeasurecode" , "weightunitmeasurecode" , "weight" , "daystomanufacture" , "productline" , "class" , "style" , "productsubcategoryid" , "productmodelid" , "sellstartdate"::text , "sellenddate"::text , "discontinueddate"::text , "rowguid" , "modifieddate"::text from production.product WHERE (((name > ? ) OR ((name = ? ) AND (weight < ? ) ) ) OR (((name = ? ) AND (weight = ? ) ) AND (listprice < ? ) ) ) ORDER BY name ASC , weight DESC , listprice DESC ")""" + s"""Fragment("select "productid", "name", "productnumber", "makeflag", "finishedgoodsflag", "color", "safetystocklevel", "reorderpoint", "standardcost", "listprice", "size", "sizeunitmeasurecode", "weightunitmeasurecode", "weight", "daystomanufacture", "productline", "class", "style", "productsubcategoryid", "productmodelid", "sellstartdate"::text, "sellenddate"::text, "discontinueddate"::text, "rowguid", "modifieddate"::text from production.product WHERE (((name > ? ) OR ((name = ? ) AND (weight < ? ) ) ) OR (((name = ? ) AND (weight = ? ) ) AND (listprice < ? ) ) ) ORDER BY name ASC , weight DESC , listprice DESC ")""" ) } } diff --git a/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala b/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala index b4a45344ae..8cbabdc7a3 100644 --- a/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala +++ b/typo/src/scala/typo/internal/codegen/DbLibDoobie.scala @@ -248,13 +248,13 @@ class DbLibDoobie(pkg: sc.QIdent, inlineImplicits: Boolean, default: ComputedDef case RepoMethod.InsertUnsaved(relName, cols, unsaved, unsavedParam, default, rowType) => val cases0 = unsaved.restCols.map { col => val set = frInterpolate(code"${runtimeInterpolateValue(code"${unsavedParam.name}.${col.name}", col.tpe)}${SqlCast.toPgCode(col)}") - code"""Some(($Fragment.const(${sc.s(col.dbName.code)}), $set))""" + code"""Some(($Fragment.const0(${sc.s(col.dbName.code)}), $set))""" } val cases1 = unsaved.defaultCols.map { case (col @ ComputedColumn(_, ident, _, _), origType) => val setValue = frInterpolate(code"${runtimeInterpolateValue(code"value: $origType", origType)}${SqlCast.toPgCode(col)}") code"""|${unsavedParam.name}.$ident match { | case ${default.Defaulted}.${default.UseDefault} => None - | case ${default.Defaulted}.${default.Provided}(value) => Some(($Fragment.const(${sc.s(col.dbName.code)}), $setValue)) + | case ${default.Defaulted}.${default.Provided}(value) => Some(($Fragment.const0(${sc.s(col.dbName.code)}), $setValue)) |}""" }