Interface SqlStructParameter


Encapsulates PreparedStatement parameter data meant to be bound to a formal Struct by PreparedStatementBinder.

The type name is database-specific and is passed to Connection.createStruct(String, Object[]). For example, DuckDB accepts an inline type such as STRUCT(name VARCHAR, age INTEGER). Attributes are positional and may contain null, nested SqlStructParameters, or SqlArrayParameters.

DuckDB attributes that represent an instant require a complete inline STRUCT declaration so Pyranid can distinguish TIMESTAMP from TIMESTAMPTZ. A named CREATE TYPE alias does not expose its attribute types through this binding path, so binding an instant-bearing value through one fails fast rather than guessing its timestamp semantics.

Standard instances may be constructed via Parameters.sqlStructOf(String, Object[]) and Parameters.sqlStructOf(String, List).

Implementations should be threadsafe.

Since:
4.7.0
Author:
Mark Allen