PgCodec
PostgreSQL-specific DbParam instances for collection types.
Import PgCodec.given to enable passing Seq[A], List[A], and IndexedSeq[A] as SQL array parameters in the sql"..." interpolator.
import zio.blocks.sql.*
import zio.blocks.sql.PgCodec.given
val ids: List[String] = List("a", "b", "c")
val frag = sql"SELECT * FROM products WHERE id = ANY($ids)"
These instances produce DbValue.DbArray values that bind as JDBC arrays via Connection.createArrayOf. The SQL element type is inferred from the Scala element type.
Attributes
- Source
- PgCodec.scala
- Graph
-
- Supertypes
- Self type
-
PgCodec.type
Members list
Type members
Classlikes
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
iArrayStringParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
indexedSeqIntParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
indexedSeqLongParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
listBooleanParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
listDoubleParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
listIntParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
listLongParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
listStringParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
listUuidParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
seqBooleanParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
seqDoubleParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
seqIntParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
seqLongParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
seqStringParam.type
Attributes
- Source
- PgCodec.scala
- Supertypes
- Self type
-
seqUuidParam.type
Givens
Givens
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
DbCodec for the blocks-native JSON AST type (zio.blocks.schema.json.Json), stored as PostgreSQL jsonb. Uses Json.print/Json.parseUnsafe directly as the JSON string codec, since they already are the canonical serialization for this type (no JsonCodec round-trip needed).
DbCodec for the blocks-native JSON AST type (zio.blocks.schema.json.Json), stored as PostgreSQL jsonb. Uses Json.print/Json.parseUnsafe directly as the JSON string codec, since they already are the canonical serialization for this type (no JsonCodec round-trip needed).
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala
Attributes
- Source
- PgCodec.scala