Compile-time Language Integrated Query for Scala - Deprecated Please move to zio-quill in https://discord.gg/MYErPQgkHH
deusaquilus on better-batch-log
Slightly better batch logging Add Trace-Type for Particulariz… (compare)
deusaquilus on better-batch-log
Slightly better batch logging (compare)
deusaquilus on insert-returning-values-clause
deusaquilus on master
Separate Capability for Multi-V… (compare)
deusaquilus on insert-returning-values-clause
Separate Capability for Multi-V… (compare)
deusaquilus on insert-returning-values-clause
Separate Capability for Multi-V… (compare)
deusaquilus on values-token-clause-cont
deusaquilus on master
Adding Capability to Idioms to … (compare)
deusaquilus on values-token-clause-cont
Add VALUES-clause Capability to… (compare)
@ val strings = quote {
querySchema[Now]("now()")
.map(t => infix"UNNEST(${lift(Seq("foo","bar"))})".pure.as[String])
}
strings: AnyRef with Quoted[io.getquill.EntityQuery[String]]{def quoted: io.getquill.ast.Map;def ast: io.getquill.ast.Map;def id1347240670(): Unit;val liftings: AnyRef{val scala.collection.immutable.Seq.apply[String]("foo", "bar"): io.getquill.quotation.ScalarValueLifting[Seq[String],Seq[String]]}} = `querySchema`("now()").map(t => infix"UNNEST(${?})")
@ run {
query[db.ResultName]
.rightJoin(infix"${strings}".pure.as[io.getquill.Query[String]])
.on(_.text == _)
.map{case (rnOpt, n) => rnOpt.map(_.id)}
}
cmd5.sc:1: SELECT x1.id FROM result_name x1 RIGHT JOIN (SELECT UNNEST(?) FROM now() t) AS t ON x1.text = t
val res5 = run {
^
org.postgresql.util.PSQLException: ERROR: operator does not exist: text = record
Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
Position: 94
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:106)
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
io.getquill.context.jdbc.JdbcContextBase.$anonfun$executeQuery$1(JdbcContextBase.scala:41)
io.getquill.context.jdbc.JdbcContextBase.$anonfun$withConnectionWrapped$2(JdbcContextBase.scala:28)
io.getquill.context.jdbc.JdbcContext$$anon$1.wrap(JdbcContext.scala:31)
io.getquill.context.jdbc.JdbcContextBase.$anonfun$withConnectionWrapped$1(JdbcContextBase.scala:28)
io.getquill.context.jdbc.JdbcContext.$anonfun$withConnection$1(JdbcContext.scala:61)
scala.Option.getOrElse(Option.scala:201)
io.getquill.context.jdbc.JdbcContext.withConnection(JdbcContext.scala:59)
io.getquill.context.jdbc.JdbcContextBase.withConnectionWrapped(JdbcContextBase.scala:28)
io.getquill.context.jdbc.JdbcContextBase.withConnectionWrapped$(JdbcContextBase.scala:27)
io.getquill.context.jdbc.JdbcContext.withConnectionWrapped(JdbcContext.scala:15)
io.getquill.context.jdbc.JdbcContextBase.executeQuery(JdbcContextBase.scala:38)
io.getquill.context.jdbc.JdbcContextBase.executeQuery$(JdbcContextBase.scala:37)
io.getquill.context.jdbc.JdbcContext.executeQuery(JdbcContext.scala:40)
ammonite.$sess.cmd5$.<clinit>(cmd5.sc:1)
case class Unnest(unnest: String)
val strings = quote {
querySchema[Unnest]("now()")
.map(t => infix"UNNEST(${lift(Seq("foo","bar"))})".pure.as[String])
}
run {
query[ResultName]
.rightJoin(infix"${strings}".pure.as[Query[Unnest]])
.on(_.text == _.unnest)
.map{case (rnOpt, n) => rnOpt.map(_.id)}
}
case class Unnest(unnest: String)
val strings = quote {
querySchema[Unnest]("now()")
.map(t => Unnest(infix"UNNEST(${lift(Seq("foo","bar"))})".as[String])).nested
}
run {
query[ResultName]
.rightJoin(strings)
.on(_.text == _.unnest)
.map{case (rnOpt, n) => rnOpt.map(_.id)}
}
SELECT x1.id FROM ResultName x1 RIGHT JOIN (SELECT UNNEST(?) AS unnest FROM now() t) AS x2 ON x1.text = x2.unnest
as unnest
part
now()
is just a function in postgres that returns the time
@ case class Unnest(unnest: String)
@ val strings = quote {
infix"UNNEST(${lift(Seq("foo","bar"))})".as[Query[Unnest]].nested
}
@ run {
query[ResultName]
.rightJoin(strings)
.on(_.text == _.unnest)
.map{case (rnOpt, n) => rnOpt.map(_.id)}
}
cmd67.sc:1: SELECT x1.id FROM ResultName x1 RIGHT JOIN (SELECT x.unnest FROM (UNNEST(?)) AS x) AS x2 ON x1.text = x2.unnest
@ case class Unnest(unnest: String)
@ val strings = quote {
infix"SELECT UNNEST(${lift(Seq("foo","bar"))})".as[Query[Unnest]].nested
}
@ run {
query[ResultName]
.rightJoin(strings)
.on(_.text == _.unnest)
.map{case (rnOpt, n) => rnOpt.map(_.id)}
}
SELECT x1.id FROM ResultName x1 RIGHT JOIN (SELECT x.unnest FROM (SELECT UNNEST(?)) AS x) AS x2 ON x1.text = x2.unnest
.nested
thing do?