Package net.bitnine.agensgraph.jdbc
Class AgConnection
java.lang.Object
org.postgresql.jdbc.PgConnection
net.bitnine.agensgraph.jdbc.AgConnection
- All Implemented Interfaces:
AutoCloseable,Connection,Wrapper,org.postgresql.core.BaseConnection,org.postgresql.PGConnection
public class AgConnection
extends org.postgresql.jdbc.PgConnection
This class defines connection to AgensGraph.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.postgresql.jdbc.PgConnection
org.postgresql.jdbc.PgConnection.AbortCommand -
Field Summary
Fields inherited from class org.postgresql.jdbc.PgConnection
defaultFetchSize, forcebinary, metadata, prepareThreshold, typemapFields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Constructor Summary
ConstructorsConstructorDescriptionAgConnection(org.postgresql.util.HostSpec[] hostSpecs, String user, String database, Properties info, String url) -
Method Summary
Modifier and TypeMethodDescriptioncreateStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) protected ArrayprepareNamedParameterStatement(String queryString) Returns a prepared statement with a named parameter.prepareNamedParameterStatement(String queryString, int autoGeneratedKeys) Returns a prepared statement with a named parameter.prepareNamedParameterStatement(String queryString, int[] columnIndexes) Returns a prepared statement with a named parameter.prepareNamedParameterStatement(String queryString, int resultSetType, int resultSetConcurrency) Returns a prepared statement with a named parameter.prepareNamedParameterStatement(String queryString, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Returns a prepared statement with a named parameter.prepareNamedParameterStatement(String queryString, String[] columnNames) Returns a prepared statement with a named parameter.prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) prepareStatement(String sql, String[] columnNames) Methods inherited from class org.postgresql.jdbc.PgConnection
abort, abort, addDataType, addDataType, addTimerTask, addWarning, binaryTransferSend, cancelQuery, checkClosed, clearWarnings, close, commit, createArrayOf, createArrayOf, createBlob, createClob, createNClob, createQuery, createQueryObject, createSQLXML, createStatement, createStatement, createStruct, createTypeInfo, encodeString, escapeIdentifier, escapeLiteral, escapeString, execSQLQuery, execSQLQuery, execSQLUpdate, finalize, getAutoCommit, getAutosave, getBackendPID, getCatalog, getClientInfo, getClientInfo, getCopyAPI, getCursorName, getDBVersionNumber, getDefaultFetchSize, getEncoding, getFastpathAPI, getFieldMetadataCache, getForceBinary, getHideUnprivilegedObjects, getHoldability, getIsolationLevelName, getLargeObjectAPI, getLogger, getLogServerErrorDetail, getMetaData, getNetworkTimeout, getNotifications, getNotifications, getObject, getParameterStatus, getParameterStatuses, getPreferQueryMode, getPrepareThreshold, getProtocolVersion, getQueryExecutor, getReplicationAPI, getReplicationProtocol, getSchema, getServerMajorVersion, getServerMinorVersion, getStandardConformingStrings, getStringVarcharFlag, getTimestampUtils, getTransactionIsolation, getTransactionState, getTypeInfo, getTypeMap, getURL, getUserName, getWarnings, getXmlFactoryFactory, haveMinimumServerVersion, haveMinimumServerVersion, hintReadOnly, isClosed, isColumnSanitiserDisabled, isReadOnly, isValid, isWrapperFor, makeBlob, makeClob, makeSQLXML, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, purgeTimerTasks, releaseSavepoint, rollback, rollback, setAutoCommit, setAutosave, setCatalog, setClientInfo, setClientInfo, setCursorName, setDefaultFetchSize, setDisableColumnSanitiser, setFlushCacheOnDeallocate, setForceBinary, setHoldability, setNetworkTimeout, setPrepareThreshold, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, setTypeMapImpl, unwrapMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
Constructor Details
-
AgConnection
public AgConnection(org.postgresql.util.HostSpec[] hostSpecs, String user, String database, Properties info, String url) throws SQLException - Throws:
SQLException
-
-
Method Details
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
createStatementin interfaceConnection- Overrides:
createStatementin classorg.postgresql.jdbc.PgConnection- Throws:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
prepareStatementin interfaceConnection- Overrides:
prepareStatementin classorg.postgresql.jdbc.PgConnection- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection- Overrides:
prepareStatementin classorg.postgresql.jdbc.PgConnection- Throws:
SQLException
-
prepareNamedParameterStatement
Returns a prepared statement with a named parameter.- Parameters:
queryString- the query string- Returns:
- a prepared statement with a named parameter
- Throws:
SQLException- the SQL exception
-
prepareNamedParameterStatement
public AgPreparedStatement prepareNamedParameterStatement(String queryString, int resultSetType, int resultSetConcurrency) throws SQLException Returns a prepared statement with a named parameter.- Parameters:
queryString- the query stringresultSetType- the result set typeresultSetConcurrency- the result set concurrency- Returns:
- a prepared statement with a named parameter.
- Throws:
SQLException- the SQL exception
-
prepareNamedParameterStatement
public AgPreparedStatement prepareNamedParameterStatement(String queryString, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Returns a prepared statement with a named parameter.- Parameters:
queryString- the query stringresultSetType- the result set typeresultSetConcurrency- the result set concurrencyresultSetHoldability- the result set holdability- Returns:
- a prepared statement with a named parameter
- Throws:
SQLException- the SQL exception
-
prepareNamedParameterStatement
public AgPreparedStatement prepareNamedParameterStatement(String queryString, int autoGeneratedKeys) throws SQLException Returns a prepared statement with a named parameter.- Parameters:
queryString- the query stringautoGeneratedKeys- the auto generated keys- Returns:
- a prepared statement with a named parameter
- Throws:
SQLException- the SQL exception
-
prepareNamedParameterStatement
public AgPreparedStatement prepareNamedParameterStatement(String queryString, int[] columnIndexes) throws SQLException Returns a prepared statement with a named parameter.- Parameters:
queryString- the query stringcolumnIndexes- the column indexes- Returns:
- a prepared statement with a named parameter
- Throws:
SQLException- the SQL exception
-
prepareNamedParameterStatement
public AgPreparedStatement prepareNamedParameterStatement(String queryString, String[] columnNames) throws SQLException Returns a prepared statement with a named parameter.- Parameters:
queryString- the query stringcolumnNames- the column names- Returns:
- a prepared statement with a named parameter
- Throws:
SQLException- the SQL exception
-
makeArray
- Overrides:
makeArrayin classorg.postgresql.jdbc.PgConnection- Throws:
SQLException
-