Stability LevelStable, unless otherwise indicated
Types and Values
GObject ╰── GdaPStmt
The GdaPStmt represents the association between a GdaStatement statement and a prepared statement which is database dependent and is an in-memory representation of a statement. Using prepared statement has the following advantages:
the parsing of the SQL has to be done only once, which improves performances if the statement has to be executed more than once
if a statement has been prepared, then it means it is syntactically correct and has been understood by the database's API
it is possible to use variables in prepared statement which eliminates the risk of SQL code injection
The GdaPStmt is not intended to be instantiated, but subclassed by database provider's implementation.
Once created, the database provider's implementation can decide to associate (for future lookup) to
a GdaStatement object in a connection using
The GdaPStmt object can keep a reference to the GdaStatement object (which can be set and get using
gda_pstmt_get_gda_statement()), however that reference
if a weak one (which means it will be lost if the GdaStatement object is destroyed).
void gda_pstmt_set_gda_statement (
that it corresponds to the preparation of the
GdaStatement * gda_pstmt_get_gda_statement (
Get a pointer to the GdaStatement which led to the creation of this prepared statement.
Note: if that statement has been modified since the creation of
, then this method
a GdaPStmt object