ldbc.sql
Members list
Type members
Classlikes
The interface used to execute SQL stored procedures. The JDBC API provides a stored procedure SQL escape syntax that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other parameters can be used for input, output or both. Parameters are referred to sequentially, by number, with the first parameter being 1.
The interface used to execute SQL stored procedures. The JDBC API provides a stored procedure SQL escape syntax that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other parameters can be used for input, output or both. Parameters are referred to sequentially, by number, with the first parameter being 1.
{?= call <procedure-name>[(<arg1>,<arg2>, ...)]} {call <procedure-name>[(<arg1>,<arg2>, ...)]}
IN parameter values are set using the set
methods inherited from `[[PreparedStatement]]`. The type of all OUT parameters must be registered prior to executing the stored procedure; their values are retrieved after execution via the get
methods provided here.
A CallableStatement
can return one `[[ResultSet]]` object or multiple ResultSet
objects. Multiple ResultSet
objects are handled using operations inherited from `[[Statement]]`.
For maximum portability, a call's ResultSet
objects and update counts should be processed prior to getting the values of output parameters.
Type parameters
- F
-
the effect type
Attributes
- Source
- CallableStatement.scala
- Supertypes
A connection (session) with a specific database. SQL statements are executed and results are returned within the context of a connection.
A connection (session) with a specific database. SQL statements are executed and results are returned within the context of a connection.
A Connection object's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is obtained with the getMetaData method.
Note: When configuring a Connection, JDBC applications should use the appropriate Connection method such as setAutoCommit or setTransactionIsolation. Applications should not invoke SQL commands directly to change the connection's configuration when there is a JDBC method available. By default a Connection object is in auto-commit mode, which means that it automatically commits changes after executing each statement. If auto-commit mode has been disabled, the method commit must be called explicitly in order to commit changes; otherwise, database changes will not be saved.
A new Connection object created using the JDBC 2.1 core API has an initially empty type map associated with it. A user may enter a custom mapping for a UDT in this type map. When a UDT is retrieved from a data source with the method ResultSet.getObject, the getObject method will check the connection's type map to see if there is an entry for that UDT. If so, the getObject method will map the UDT to the class indicated. If there is no entry, the UDT will be mapped using the standard mapping.
A user may create a new type map, which is a java.util.Map object, make an entry in it, and pass it to the java.sql methods that can perform custom mapping. In this case, the method will use the given type map instead of the one associated with the connection.
Type parameters
- F
-
The effect type
Attributes
- Companion
- object
- Source
- Connection.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Source
- Connection.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Connection.type
A factory for connections to the physical data source that this DataSource object represents. An alternative to the DriverManager facility, a DataSource object is the preferred means of getting a connection. An object that implements the DataSource interface will typically be registered with a naming service based on the Java™ Naming and Directory (JNDI) API.
The DataSource interface is implemented by a driver vendor. There are three types of implementations:
A factory for connections to the physical data source that this DataSource object represents. An alternative to the DriverManager facility, a DataSource object is the preferred means of getting a connection. An object that implements the DataSource interface will typically be registered with a naming service based on the Java™ Naming and Directory (JNDI) API.
The DataSource interface is implemented by a driver vendor. There are three types of implementations:
- Basic implementation -- produces a standard Connection object
- Connection pooling implementation -- produces a Connection object that will automatically participate in connection pooling. This implementation works with a middle-tier connection pooling manager.
- Distributed transaction implementation -- produces a Connection object that may be used for distributed transactions and almost always participates in connection pooling. This implementation works with a middle-tier transaction manager and almost always with a connection pooling manager.
A DataSource object has properties that can be modified when necessary. For example, if the data source is moved to a different server, the property for the server can be changed. The benefit is that because the data source's properties can be changed, any code accessing that data source does not need to be changed.
A driver that is accessed via a DataSource object does not register itself with the DriverManager. Rather, a DataSource object is retrieved through a lookup operation and then used to create a Connection object. With a basic implementation, the connection obtained through a DataSource object is identical to a connection obtained through the DriverManager facility.
Type parameters
- F
-
The effect type
Attributes
- Source
- DataSource.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Comprehensive information about the database as a whole.
Comprehensive information about the database as a whole.
This interface is implemented by driver vendors to let users know the capabilities of a Database Management System (DBMS) in combination with the driver based on JDBC™ technology ("JDBC driver") that is used with it. Different relational DBMSs often support different features, implement features in different ways, and use different data types. In addition, a driver may implement a feature on top of what the DBMS offers. Information returned by methods in this interface applies to the capabilities of a particular driver and a particular DBMS working together. Note that as used in this documentation, the term "database" is used generically to refer to both the driver and DBMS.
A user for this interface is commonly a tool that needs to discover how to deal with the underlying DBMS. This is especially true for applications that are intended to be used with more than one DBMS. For example, a tool might use the method getTypeInfo
to find out what data types can be used in a CREATE TABLE
statement. Or a user might call the method supportsCorrelatedSubqueries
to see if it is possible to use a correlated subquery or supportsBatchUpdates
to see if it is possible to use batch updates.
Some DatabaseMetaData
methods return lists of information in the form of ResultSet
objects. Regular ResultSet
methods, such as getString
and getInt
, can be used to retrieve the data from these ResultSet
objects. If a given form of metadata is not available, an empty ResultSet
will be returned. Additional columns beyond the columns defined to be returned by the ResultSet
object for a given method can be defined by the JDBC driver vendor and must be accessed by their column label.
Some DatabaseMetaData
methods take arguments that are String patterns. These arguments all have names such as fooPattern. Within a pattern String, "%" means match any substring of 0 or more characters, and "_" means match any one character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to null
, that argument's criterion will be dropped from the search.
Type parameters
- F
-
the effect type
Attributes
- Companion
- object
- Source
- DatabaseMetaData.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Source
- DatabaseMetaData.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DatabaseMetaData.type
An object that can be used to get information about the types and properties for each parameter marker in a PreparedStatement object. For some queries and driver implementations, the data that would be returned by a ParameterMetaData object may not be available until the PreparedStatement has been executed.
An object that can be used to get information about the types and properties for each parameter marker in a PreparedStatement object. For some queries and driver implementations, the data that would be returned by a ParameterMetaData object may not be available until the PreparedStatement has been executed.
Some driver implementations may not be able to provide information about the types and properties for each parameter marker in a CallableStatement object.
Type parameters
- F
-
The effect type
Attributes
- Companion
- object
- Source
- ParameterMetaData.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Source
- ParameterMetaData.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ParameterMetaData.type
An object that represents a precompiled SQL statement.
An object that represents a precompiled SQL statement.
A SQL statement is precompiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.
Note: The setter methods (setShort, setString, and so on) for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type INTEGER, then the method setInt should be used.
Type parameters
- F
-
The effect type
Attributes
- Source
- PreparedStatement.scala
- Supertypes
- Known subtypes
-
trait CallableStatement[F]
A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
A table of data representing a database result set, which is usually generated by executing a statement that queries the database.
Type parameters
- F
-
The effect type
Attributes
- Companion
- object
- Source
- ResultSet.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Source
- ResultSet.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ResultSet.type
An object that can be used to get information about the types and properties of the columns in a ResultSet
object. The following code fragment creates the ResultSet
object rs, creates the ResultSetMetaData
object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE
clause.
An object that can be used to get information about the types and properties of the columns in a ResultSet
object. The following code fragment creates the ResultSet
object rs, creates the ResultSetMetaData
object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE
clause.
for
rs <- stmt.executeQuery("SELECT a, b, c FROM TABLE2")
rsmd <- rs.getMetaData()
yield
val rsmd = rs.getMetaData()
val numberOfColumns = rsmd.getColumnCount()
val b = rsmd.isSearchable(1)
Attributes
- Companion
- object
- Source
- ResultSetMetaData.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Source
- ResultSetMetaData.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ResultSetMetaData.type
Enumeration for RowId life-time values.
An object that is used to identify a generic SQL type, called a JDBC type or a vendor specific data type.
An object that is used to identify a generic SQL type, called a JDBC type or a vendor specific data type.
Attributes
- Source
- SQLType.scala
- Supertypes
-
class Objecttrait Matchableclass Any
The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method. When a transaction is rolled back to a savepoint all changes made after that savepoint are undone.
The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method. When a transaction is rolled back to a savepoint all changes made after that savepoint are undone.
Savepoints can be either named or unnamed. Unnamed savepoints are identified by an ID generated by the underlying data source.
Attributes
- Source
- Savepoint.scala
- Supertypes
-
class Objecttrait Matchableclass Any
The object used for executing a static SQL statement and returning the results it produces.
By default, only one ResultSet
object per Statement
object can be open at the same time. Therefore, if the reading of one ResultSet
object is interleaved with the reading of another, each must have been generated by different Statement
objects. All execution methods in the Statement
interface implicitly close a current ResultSet
object of the statement if an open one exists.
Type parameters
- F
-
The effect type
Attributes
- Companion
- object
- Source
- Statement.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait PreparedStatement[F]trait CallableStatement[F]
Attributes
- Companion
- trait
- Source
- Statement.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Statement.type
The object that defines the constants that are used to identify generic SQL types, called JDBC types.
The object that defines the constants that are used to identify generic SQL types, called JDBC types.
Attributes
- Source
- Types.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Types.type