Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mbryzek committed Jul 31, 2024
1 parent 38914e5 commit ecaf08f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 55 deletions.
6 changes: 3 additions & 3 deletions dao/spec/psql-apibuilder.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"value": {
"version": "3.4",
"package": "db.generated",
"user_class": "uuid"
"user_class": "java.util.UUID"
}
},
{
Expand Down Expand Up @@ -105,15 +105,15 @@
"audit": {
"created": {
"at": { "type": "date-time-iso8601" },
"by": { "name": "updated_by_guid", "type": "uuid" }
"by": { "name": "created_by_guid", "type": "uuid" }
},
"updated": {
"at": { "type": "date-time-iso8601" },
"by": { "name": "updated_by_guid", "type": "uuid" }
},
"deleted": {
"at": { "type": "date-time-iso8601" },
"by": { "name": "updated_by_guid", "type": "uuid" }
"by": { "name": "deleted_by_guid", "type": "uuid" }
}
}
}
Expand Down
36 changes: 18 additions & 18 deletions generated/app/db/GeneratorInvocationsDao.scala
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
}

def insert(
user: uuid,
user: java.util.UUID,
form: GeneratorInvocationForm
): String = {
db.withConnection { c =>
Expand All @@ -241,7 +241,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.

def insert(
c: java.sql.Connection,
user: uuid,
user: java.util.UUID,
form: GeneratorInvocationForm
): String = {
val id = randomId
Expand All @@ -253,7 +253,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
}

def insertBatch(
user: uuid,
user: java.util.UUID,
forms: Seq[GeneratorInvocationForm]
): Seq[String] = {
db.withConnection { c =>
Expand All @@ -263,7 +263,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.

def insertBatch(
c: java.sql.Connection,
user: uuid,
user: java.util.UUID,
forms: Seq[GeneratorInvocationForm]
): Seq[String] = {
forms.map { f =>
Expand All @@ -279,7 +279,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
}

def update(
user: uuid,
user: java.util.UUID,
generatorInvocation: GeneratorInvocation,
form: GeneratorInvocationForm
): Unit = {
Expand All @@ -290,7 +290,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.

def update(
c: java.sql.Connection,
user: uuid,
user: java.util.UUID,
generatorInvocation: GeneratorInvocation,
form: GeneratorInvocationForm
): Unit = {
Expand All @@ -303,7 +303,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
}

def updateById(
user: uuid,
user: java.util.UUID,
id: String,
form: GeneratorInvocationForm
): Unit = {
Expand All @@ -314,7 +314,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.

def updateById(
c: java.sql.Connection,
user: uuid,
user: java.util.UUID,
id: String,
form: GeneratorInvocationForm
): Unit = {
Expand All @@ -326,7 +326,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
}

def updateBatch(
user: uuid,
user: java.util.UUID,
forms: Seq[(String, GeneratorInvocationForm)]
): Unit = {
db.withConnection { c =>
Expand All @@ -336,7 +336,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.

def updateBatch(
c: java.sql.Connection,
user: uuid,
user: java.util.UUID,
forms: Seq[(String, GeneratorInvocationForm)]
): Unit = {
forms.map { case (id, f) => toNamedParameter(user, id, f) }.toList match {
Expand All @@ -346,7 +346,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
}

def delete(
user: uuid,
user: java.util.UUID,
generatorInvocation: GeneratorInvocation
): Unit = {
db.withConnection { c =>
Expand All @@ -356,7 +356,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.

def delete(
c: java.sql.Connection,
user: uuid,
user: java.util.UUID,
generatorInvocation: GeneratorInvocation
): Unit = {
deleteById(
Expand All @@ -367,7 +367,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
}

def deleteById(
user: uuid,
user: java.util.UUID,
id: String
): Unit = {
db.withConnection { c =>
Expand All @@ -377,14 +377,14 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.

def deleteById(
c: java.sql.Connection,
user: uuid,
user: java.util.UUID,
id: String
): Unit = {
DeleteQuery.equals("id", id).execute(c)
}

def deleteAllByIds(
user: uuid,
user: java.util.UUID,
ids: Seq[String]
): Unit = {
db.withConnection { c =>
Expand All @@ -394,15 +394,15 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.

def deleteAllByIds(
c: java.sql.Connection,
user: uuid,
user: java.util.UUID,
ids: Seq[String]
): Unit = {
DeleteQuery.in("id", ids).execute(c)
}

private def bindQuery(
query: io.flow.postgresql.Query,
user: uuid,
user: java.util.UUID,
form: GeneratorInvocationForm
): io.flow.postgresql.Query = {
query
Expand All @@ -415,7 +415,7 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
}

private def toNamedParameter(
user: uuid,
user: java.util.UUID,
id: String,
form: GeneratorInvocationForm
): Seq[anorm.NamedParameter] = {
Expand Down
Loading

0 comments on commit ecaf08f

Please sign in to comment.