DatabaseInsertQueryBuilder
Internal implementation of InsertQueryBuilder for building SQL INSERT statements.
Constructors
Properties
Functions
Converts this builder to a StepBuilder, which enables lazy execution within a transaction. Returns a wrapper with terminal methods that create TransactionStep instead of executing the query.
Builds the SQL fragment for the RETURNING clause.
Creates a formatted SQL fragment for the WITH clause based on added queries. Each CTE is on a new line for readability.
Creates and returns a deep copy of this builder. Enables safe creation of query variants without modifying the original.
Copies state from another builder of the same type. Used by copy() methods in derived classes.
Executes a modifying query (without RETURNING) and returns the number of affected rows. Throws an exception if a RETURNING clause was used - in that case, use toList(), toSingle(), etc. methods instead.
Generic function for executing queries, wrapping logic in error handling, type conversion, and logging.
Configures the ON CONFLICT clause in a fluent and safe manner. Example: .onConflict { onColumns("email") doUpdate("last_login = NOW()") }
Marks the WITH clause as recursive.
Adds a RETURNING clause to the modifying query (INSERT, UPDATE, DELETE).
Executes the query and returns the value from the first column of the first row. Always fails on empty result.
Executes the query and maps the result to a single object of the given type.
Executes the query and returns the first row. Always fails on empty result.
Adds a query to the WITH clause (Common Table Expression).