Interface RelationalStatement
-
- All Superinterfaces:
java.lang.AutoCloseable
,RelationalDirectAccessStatement
,java.sql.Statement
,java.sql.Wrapper
public interface RelationalStatement extends java.sql.Statement, RelationalDirectAccessStatement
Extension ofStatement
to allow support for non-query database access.There are two ways that the database can be accessed:
- Query Language
- The Query language used by Relational is a subset of the PartiQL Spec.
- Direct Access
- The Direct Access API allows a user to access simplified database-like functions without requiring the writing of a SQL query. Its primary purpose for existing is historical, to allow for easier integration support with existing system users, and is not (generally) recommended for new use cases.
Direct Access API Details
The Direct Access API allows simplified execution of the following functionality:
- Get By Key
- Scan By Key range
- Insert one or more records
- Delete one or more records
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addBatch(java.lang.String sql)
default void
cancel()
default void
clearBatch()
default void
clearWarnings()
default void
closeOnCompletion()
default boolean
execute(java.lang.String sql, int autoGeneratedKeys)
default boolean
execute(java.lang.String sql, int[] columnIndexes)
default boolean
execute(java.lang.String sql, java.lang.String[] columnNames)
default int[]
executeBatch()
RelationalResultSet
executeQuery(java.lang.String sql)
default int
executeUpdate(java.lang.String sql, int autoGeneratedKeys)
default int
executeUpdate(java.lang.String sql, int[] columnIndexes)
default int
executeUpdate(java.lang.String sql, java.lang.String[] columnNames)
default int
getFetchDirection()
default int
getFetchSize()
default java.sql.ResultSet
getGeneratedKeys()
default int
getMaxFieldSize()
default boolean
getMoreResults()
default boolean
getMoreResults(int current)
default int
getQueryTimeout()
RelationalResultSet
getResultSet()
default int
getResultSetConcurrency()
default int
getResultSetHoldability()
default int
getResultSetType()
default int
getUpdateCount()
default java.sql.SQLWarning
getWarnings()
default boolean
isCloseOnCompletion()
default boolean
isPoolable()
default boolean
isWrapperFor(java.lang.Class<?> iface)
default void
setCursorName(java.lang.String name)
default void
setEscapeProcessing(boolean enable)
default void
setFetchDirection(int direction)
default void
setFetchSize(int rows)
default void
setMaxFieldSize(int max)
default void
setPoolable(boolean poolable)
default void
setQueryTimeout(int seconds)
default <T> T
unwrap(java.lang.Class<T> iface)
-
Methods inherited from interface com.apple.foundationdb.relational.api.RelationalDirectAccessStatement
close, executeDelete, executeDelete, executeDelete, executeDelete, executeDeleteRange, executeGet, executeInsert, executeInsert, executeInsert, executeInsert, executeScan
-
Methods inherited from interface java.sql.Statement
close, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, getConnection, getLargeMaxRows, getLargeUpdateCount, getMaxRows, isClosed, isSimpleIdentifier, setLargeMaxRows, setMaxRows
-
-
-
-
Method Detail
-
executeQuery
RelationalResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
- Specified by:
executeQuery
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getResultSet
RelationalResultSet getResultSet() throws java.sql.SQLException
- Specified by:
getResultSet
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeUpdate
default int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeUpdate
default int executeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeUpdate
default int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getMaxFieldSize
default int getMaxFieldSize() throws java.sql.SQLException
- Specified by:
getMaxFieldSize
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setMaxFieldSize
default void setMaxFieldSize(int max) throws java.sql.SQLException
- Specified by:
setMaxFieldSize
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setEscapeProcessing
default void setEscapeProcessing(boolean enable) throws java.sql.SQLException
- Specified by:
setEscapeProcessing
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getQueryTimeout
default int getQueryTimeout() throws java.sql.SQLException
- Specified by:
getQueryTimeout
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setQueryTimeout
default void setQueryTimeout(int seconds) throws java.sql.SQLException
- Specified by:
setQueryTimeout
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
cancel
default void cancel() throws java.sql.SQLException
- Specified by:
cancel
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getWarnings
default java.sql.SQLWarning getWarnings() throws java.sql.SQLException
- Specified by:
getWarnings
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
clearWarnings
default void clearWarnings() throws java.sql.SQLException
- Specified by:
clearWarnings
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setCursorName
default void setCursorName(java.lang.String name) throws java.sql.SQLException
- Specified by:
setCursorName
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
execute
default boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
execute
default boolean execute(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
execute
default boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getUpdateCount
default int getUpdateCount() throws java.sql.SQLException
- Specified by:
getUpdateCount
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getMoreResults
default boolean getMoreResults() throws java.sql.SQLException
- Specified by:
getMoreResults
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getMoreResults
default boolean getMoreResults(int current) throws java.sql.SQLException
- Specified by:
getMoreResults
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setFetchDirection
default void setFetchDirection(int direction) throws java.sql.SQLException
- Specified by:
setFetchDirection
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getFetchDirection
default int getFetchDirection() throws java.sql.SQLException
- Specified by:
getFetchDirection
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setFetchSize
default void setFetchSize(int rows) throws java.sql.SQLException
- Specified by:
setFetchSize
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getFetchSize
default int getFetchSize() throws java.sql.SQLException
- Specified by:
getFetchSize
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getResultSetConcurrency
default int getResultSetConcurrency() throws java.sql.SQLException
- Specified by:
getResultSetConcurrency
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getResultSetType
default int getResultSetType() throws java.sql.SQLException
- Specified by:
getResultSetType
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
addBatch
default void addBatch(java.lang.String sql) throws java.sql.SQLException
- Specified by:
addBatch
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
clearBatch
default void clearBatch() throws java.sql.SQLException
- Specified by:
clearBatch
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeBatch
default int[] executeBatch() throws java.sql.SQLException
- Specified by:
executeBatch
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getGeneratedKeys
default java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException
- Specified by:
getGeneratedKeys
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getResultSetHoldability
default int getResultSetHoldability() throws java.sql.SQLException
- Specified by:
getResultSetHoldability
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setPoolable
default void setPoolable(boolean poolable) throws java.sql.SQLException
- Specified by:
setPoolable
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
isPoolable
default boolean isPoolable() throws java.sql.SQLException
- Specified by:
isPoolable
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
closeOnCompletion
default void closeOnCompletion() throws java.sql.SQLException
- Specified by:
closeOnCompletion
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
isCloseOnCompletion
default boolean isCloseOnCompletion() throws java.sql.SQLException
- Specified by:
isCloseOnCompletion
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
unwrap
default <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
isWrapperFor
default boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
-