Companion object providing implicit ParameterBinder instances for common types.
This object contains given instances for primitive types (Int, Long, Double, String, Boolean) and Option types, providing automatic parameter binding for these common cases.
Attributes
- Since
-
0.1.0
- Companion
- trait
- Graph
-
- Supertypes
- Self type
-
ParameterBinder.type
Members list
Type members
Classlikes
Implicit ParameterBinder for BigDecimal values.
Implicit ParameterBinder for BigDecimal values.
Attributes
- Since
-
0.1.4
- Example
-
batch.addBatch((BigDecimal("123.45"), "item")) - Supertypes
- Self type
-
bigDecimalBinder.type
Implicit ParameterBinder for Boolean values.
Implicit ParameterBinder for Boolean values.
Attributes
- Since
-
0.1.0
- Example
-
batch.addBatch(("Product A", true)) // true for active - Supertypes
- Self type
-
booleanBinder.type
Implicit ParameterBinder for Array[Byte] values (BLOB columns).
Implicit ParameterBinder for Array[Byte] values (BLOB columns).
Attributes
- Since
-
0.1.4
- Supertypes
- Self type
-
bytesBinder.type
Implicit ParameterBinder for java.sql.Date values.
Implicit ParameterBinder for java.sql.Date values.
Attributes
- Since
-
0.1.4
- Example
-
batch.addBatch((java.sql.Date.valueOf("2024-06-15"), "event")) - Supertypes
- Self type
-
dateBinder.type
Implicit ParameterBinder for Double values.
Implicit ParameterBinder for Double values.
Attributes
- Since
-
0.1.0
- Example
-
batch.addBatch(("Product", 19.99)) - Supertypes
- Self type
-
doubleBinder.type
Implicit ParameterBinder for Float values.
Implicit ParameterBinder for Float values.
Attributes
- Since
-
0.1.4
- Supertypes
- Self type
-
floatBinder.type
Implicit ParameterBinder for Int values.
Implicit ParameterBinder for Int values.
Attributes
- Since
-
0.1.0
- Example
-
// Used automatically in batch operations batch.addBatch(("Alice", 25)) // 25 bound as Int - Supertypes
- Self type
-
intBinder.type
Implicit ParameterBinder for java.time.LocalDate values.
Implicit ParameterBinder for java.time.LocalDate values.
Passed via setObject; DuckDB maps this to the DATE column type.
Attributes
- Since
-
0.1.4
- Supertypes
- Self type
-
localDateBinder.type
Implicit ParameterBinder for java.time.LocalDateTime values.
Implicit ParameterBinder for java.time.LocalDateTime values.
Passed via setObject; DuckDB maps this to the TIMESTAMP column type.
Attributes
- Since
-
0.1.4
- Supertypes
- Self type
-
localDateTimeBinder.type
Implicit ParameterBinder for Long values.
Implicit ParameterBinder for Long values.
Attributes
- Since
-
0.1.0
- Example
-
batch.addBatch((1234567890L, "data")) - Supertypes
- Self type
-
longBinder.type
Implicit ParameterBinder for java.time.OffsetDateTime values.
Implicit ParameterBinder for java.time.OffsetDateTime values.
Passed via setObject; DuckDB maps this to the TIMESTAMPTZ column type.
Attributes
- Since
-
0.1.4
- Supertypes
- Self type
-
offsetDateTimeBinder.type
Implicit ParameterBinder for String values.
Implicit ParameterBinder for String values.
Attributes
- Since
-
0.1.0
- Example
-
batch.addBatch(("Alice", "Engineer")) - Supertypes
- Self type
-
stringBinder.type
Implicit ParameterBinder for java.sql.Timestamp values.
Implicit ParameterBinder for java.sql.Timestamp values.
Attributes
- Since
-
0.1.4
- Example
-
batch.addBatch((java.sql.Timestamp.valueOf("2024-01-01 12:00:00"), "event")) - Supertypes
- Self type
-
timestampBinder.type
Implicit ParameterBinder for java.util.UUID values.
Implicit ParameterBinder for java.util.UUID values.
DuckDB supports UUID natively; this binder uses setObject to pass the UUID directly without string conversion.
Attributes
- Since
-
0.1.4
- Example
-
batch.addBatch((java.util.UUID.randomUUID(), "label")) - Supertypes
- Self type
-
uuidBinder.type
Givens
Givens
Implicit ParameterBinder for BigDecimal values.
Implicit ParameterBinder for BigDecimal values.
Attributes
- Since
-
0.1.4
- Example
-
batch.addBatch((BigDecimal("123.45"), "item"))
Implicit ParameterBinder for Boolean values.
Implicit ParameterBinder for Boolean values.
Attributes
- Since
-
0.1.0
- Example
-
batch.addBatch(("Product A", true)) // true for active
Implicit ParameterBinder for Array[Byte] values (BLOB columns).
Implicit ParameterBinder for java.sql.Date values.
Implicit ParameterBinder for java.sql.Date values.
Attributes
- Since
-
0.1.4
- Example
-
batch.addBatch((java.sql.Date.valueOf("2024-06-15"), "event"))
Implicit ParameterBinder for Double values.
Implicit ParameterBinder for Double values.
Attributes
- Since
-
0.1.0
- Example
-
batch.addBatch(("Product", 19.99))
Implicit ParameterBinder for Float values.
Implicit ParameterBinder for Int values.
Implicit ParameterBinder for Int values.
Attributes
- Since
-
0.1.0
- Example
-
// Used automatically in batch operations batch.addBatch(("Alice", 25)) // 25 bound as Int
Implicit ParameterBinder for java.time.LocalDate values.
Implicit ParameterBinder for java.time.LocalDate values.
Passed via setObject; DuckDB maps this to the DATE column type.
Attributes
- Since
-
0.1.4
Implicit ParameterBinder for java.time.LocalDateTime values.
Implicit ParameterBinder for java.time.LocalDateTime values.
Passed via setObject; DuckDB maps this to the TIMESTAMP column type.
Attributes
- Since
-
0.1.4
Implicit ParameterBinder for Long values.
Implicit ParameterBinder for Long values.
Attributes
- Since
-
0.1.0
- Example
-
batch.addBatch((1234567890L, "data"))
Implicit ParameterBinder for java.time.OffsetDateTime values.
Implicit ParameterBinder for java.time.OffsetDateTime values.
Passed via setObject; DuckDB maps this to the TIMESTAMPTZ column type.
Attributes
- Since
-
0.1.4
Implicit ParameterBinder for Option values.
Implicit ParameterBinder for Option values.
This binder handles nullable parameters by binding the wrapped value if present, or NULL if the Option is None.
Type parameters
- T
-
the type of the wrapped value
Value parameters
- binder
-
implicit ParameterBinder for the wrapped type T
Attributes
- Returns
-
a ParameterBinder for Option[T]
- Since
-
0.1.0
- Example
-
// Some values are bound normally, None becomes NULL batch.addBatch( ("Alice", Some(25)), // age = 25 ("Bob", None) // age = NULL )
Implicit ParameterBinder for String values.
Implicit ParameterBinder for String values.
Attributes
- Since
-
0.1.0
- Example
-
batch.addBatch(("Alice", "Engineer"))
Implicit ParameterBinder for java.sql.Timestamp values.
Implicit ParameterBinder for java.sql.Timestamp values.
Attributes
- Since
-
0.1.4
- Example
-
batch.addBatch((java.sql.Timestamp.valueOf("2024-01-01 12:00:00"), "event"))
Implicit ParameterBinder for java.util.UUID values.
Implicit ParameterBinder for java.util.UUID values.
DuckDB supports UUID natively; this binder uses setObject to pass the UUID directly without string conversion.
Attributes
- Since
-
0.1.4
- Example
-
batch.addBatch((java.util.UUID.randomUUID(), "label"))