public class PSBuilder
extends java.lang.Object
Constructor and Description |
---|
PSBuilder() |
Modifier and Type | Method and Description |
---|---|
static DmPreparedStatement |
getInsert(java.sql.Connection con,
DataNode n,
java.lang.String quote,
java.lang.String schemaName,
boolean autoincrement)
Builds an insert statement
|
static DmPreparedStatement |
getSelect(java.lang.String vendor,
java.sql.Connection con,
DataNode n,
java.lang.String quote,
java.lang.String schemaName) |
static DmPreparedStatement |
getUpdate(java.sql.Connection con,
DataNode n,
java.lang.String quote,
java.lang.String schemaName)
Generate update query based on data in node.
|
public static DmPreparedStatement getUpdate(@NotNull java.sql.Connection con, @NotNull DataNode n, java.lang.String quote, @Nullable java.lang.String schemaName) throws java.sql.SQLException
con
- The connection the statement is forn
- The node to build a statement forquote
- The type of quote for escaping column namesschemaName
- The schema name (for things like PostgreSQL)java.sql.SQLException
- On error creating the statementpublic static DmPreparedStatement getInsert(@NotNull java.sql.Connection con, @NotNull DataNode n, java.lang.String quote, @Nullable java.lang.String schemaName, boolean autoincrement) throws java.sql.SQLException
con
- The connection the statement is forn
- The node to build a statement forquote
- The type of quote for escaping column namesschemaName
- The schema name (for things like PostgreSQL)autoincrement
- True is auto-generated columns should be returnedjava.sql.SQLException
- On error building the statement@Nullable public static DmPreparedStatement getSelect(@NotNull java.lang.String vendor, @NotNull java.sql.Connection con, @NotNull DataNode n, java.lang.String quote, @Nullable java.lang.String schemaName) throws java.io.UnsupportedEncodingException, java.sql.SQLException
vendor
- The database vendorcon
- The connection the statement is forn
- The node to build a statement forquote
- The type of quote for escaping column namesschemaName
- The schema name (for things like PostgreSQL)java.sql.SQLException
- On error building the statementjava.io.UnsupportedEncodingException
- On error decoding/encoding the values