我正在将 Quill 与 Doobie 和 PostgreSQL(org.tpolecat.doobie-quill
版本 0.13.1 的工件)一起使用。
这段代码
case class SomeRecord(id: Int, order: Int, name: String)
val record = SomeRecord(0, 0, "test")
run(
quote(
querySchema[SomeRecord]("some_table")
).insert(lift(record))
)
将在运行时出现错误消息:
org.postgresql.util.PSQLException:错误:“订单”或附近的语法错误位置:org.postgresql.core.v3.QueryExecutorImpl 的 org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) 的 46 .processResults(QueryExecutorImpl.java:2285) 在 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) 在 org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481) 在 org.postgresql。 jdbc.PgStatement.execute(PgStatement.java:401) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:130) at com.zaxxer .hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) 在 com.zaxxer.hikari.pool.HikariProxyPreparedStatement。executeUpdate(HikariProxyPreparedStatement.java) 在 doobie.free.KleisliInterpreter$PreparedStatementInterpreter.$anonfun$executeUpdate$5(kleisliinterpreter.scala:955) 在 doobie.free.KleisliInterpreter$PreparedStatementInterpreter.$anonfun$executeUpdate$5$adapted(kleisliinterpreter.scala:955)在 doobie.free.KleisliInterpreter.$anonfun$primitive$2(kleisliinterpreter.scala:109)