ldbc.sql

package ldbc.sql

Top-level imports provide aliases for the most commonly used types and modules. A typical starting set of imports might look something like this.

example:

 import ldbc.sql.*

Attributes

Members list

Packages

package ldbc.sql.util

Type members

Classlikes

trait Connection[F[_]]

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
Supertypes
class Object
trait Matchable
class Any
object Connection

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Connection.type
trait Parameter[F[_], -T]

Trait for setting Scala and Java values to PreparedStatement.

Trait for setting Scala and Java values to PreparedStatement.

Type parameters

F

The effect type

T

Scala and Java types available in PreparedStatement.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Parameter

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Parameter.type
trait ParameterBinder[F[_]]

Trait to allow values to be set in PreparedStatement with only index by generating them from Parameter.

Trait to allow values to be set in PreparedStatement with only index by generating them from Parameter.

Type parameters

F

The effect type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait ParameterMetaData[F[_]]

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
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait PreparedStatement[F[_]]

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.

If arbitrary parameter type conversions are required, the method setObject should be used with a target SQL type.

Type parameters

F

The effect type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait ResultSet[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.

A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.

A default ResultSet object is not updatable and has a cursor that moves forward only. Thus, you can iterate through it only once and only from the first row to the last row. It is possible to produce ResultSet objects that are scrollable and/or updatable.

The ResultSet interface provides getter methods (getBoolean, getLong, and so on) for retrieving column values from the current row. Values can be retrieved using either the index number of the column or the name of the column. In general, using the column index will be more efficient. Columns are numbered from 1. For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.

For the getter methods, a JDBC driver attempts to convert the underlying data to the Java type specified in the getter method and returns a suitable Java value. The JDBC specification has a table showing the allowable mappings from SQL types to Java types that can be used by the ResultSet getter methods.

Column names used as input to getter methods are case insensitive. When a getter method is called with a column name and several columns have the same name, the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query that generated the result set. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names are used, the programmer should take care to guarantee that they uniquely refer to the intended columns, which can be assured with the SQL AS clause.

A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.

The number, types and properties of a ResultSet object's columns are provided by the ResultSetMetaData object returned by the ResultSet.getMetaData method.

Type parameters

F

The effect type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object ResultSet

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
ResultSet.type
trait ResultSetConsumer[F[_], T]

Trait for generating the specified data type from a ResultSet.

Trait for generating the specified data type from a ResultSet.

Type parameters

F

The effect type

T

Type you want to build with data obtained from ResultSet

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait ResultSetMetaData[F[_]]

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.

Type parameters

F

The effect type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait ResultSetReader[F[_], T]

Trait to get the DataType that matches the Scala type information from the ResultSet.

Trait to get the DataType that matches the Scala type information from the ResultSet.

Type parameters

F

The effect type

T

Scala types that match SQL DataType

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait SQLType[F[_]]

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.

Type parameters

F

The effect type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object SQLType

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
SQLType.type
trait Statement[F[_]]

The object used for executing a static SQL statement and returning the results it produces.

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
Supertypes
class Object
trait Matchable
class Any
object Statement

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Statement.type

Inherited classlikes

object COLUMN_FORMAT

Attributes

Inherited from:
Alias (hidden)
Supertypes
class Object
trait Matchable
class Any
object STORAGE

Attributes

Inherited from:
Alias (hidden)
Supertypes
class Object
trait Matchable
class Any

Types

type DataType[T] = DataType[T]
type Table[P <: Product] = Table[P]

Inherited types

type BIGINT[T <: Long | BigInt | Option[Long | BigInt]] = Bigint[T]

Attributes

Inherited from:
Alias (hidden)
type BINARY[T <: Array[Byte] | Option[Array[Byte]]] = Binary[T]

Attributes

Inherited from:
Alias (hidden)
type BIT[T <: Byte | Short | Int | Long | Option[Byte | Short | Int | Long]] = Bit[T]

Attributes

Inherited from:
Alias (hidden)
type BLOB[T <: Array[Byte] | Option[Array[Byte]]] = Blob[T]

Attributes

Inherited from:
Alias (hidden)
type CHAR[T <: String | Option[String]] = CChar[T]

Attributes

Inherited from:
Alias (hidden)
type DATE[T <: LocalDate | Option[LocalDate]] = Date[T]

Attributes

Inherited from:
Alias (hidden)
type DATETIME[T <: Instant | LocalDateTime | Option[Instant | LocalDateTime]] = DateTime[T]

Attributes

Inherited from:
Alias (hidden)
type DECIMAL[T <: BigDecimal | Option[BigDecimal]] = Decimal[T]

Attributes

Inherited from:
Alias (hidden)
type FLOAT[T <: Double | Float | Option[Double | Float]] = CFloat[T]

Attributes

Inherited from:
Alias (hidden)
type INTEGER[T <: Int | Long | Option[Int | Long]] = Integer[T]

Attributes

Inherited from:
Alias (hidden)
type LONGBLOB[T <: Array[Byte] | Option[Array[Byte]]] = LongBlob[T]

Attributes

Inherited from:
Alias (hidden)
type LONGTEXT[T <: String | Option[String]] = LongText[T]

Attributes

Inherited from:
Alias (hidden)
type MEDIUMBLOB[T <: Array[Byte] | Option[Array[Byte]]] = Mediumblob[T]

Attributes

Inherited from:
Alias (hidden)
type MEDIUMINT[T <: Int | Option[Int]] = Mediumint[T]

Attributes

Inherited from:
Alias (hidden)
type MEDIUMTEXT[T <: String | Option[String]] = MediumText[T]

Attributes

Inherited from:
Alias (hidden)
type SMALLINT[T <: Short | Int | Option[Short | Int]] = Smallint[T]

Attributes

Inherited from:
Alias (hidden)
type TABLE[P <: Product] = Table[P]

Attributes

Inherited from:
Alias (hidden)
type TEXT[T <: String | Option[String]] = Text[T]

Attributes

Inherited from:
Alias (hidden)
type TIME[T <: LocalTime | Option[LocalTime]] = Time[T]

Attributes

Inherited from:
Alias (hidden)
type TIMESTAMP[T <: Instant | LocalDateTime | Option[Instant | LocalDateTime]] = TimeStamp[T]

Attributes

Inherited from:
Alias (hidden)
type TINYBLOB[T <: Array[Byte] | Option[Array[Byte]]] = Tinyblob[T]

Attributes

Inherited from:
Alias (hidden)
type TINYINT[T <: Byte | Short | Option[Byte | Short]] = Tinyint[T]

Attributes

Inherited from:
Alias (hidden)
type TINYTEXT[T <: String | Option[String]] = TinyText[T]

Attributes

Inherited from:
Alias (hidden)
type VARCHAR[T <: String | Option[String]] = Varchar[T]

Attributes

Inherited from:
Alias (hidden)
type YEAR[T <: Instant | LocalDate | Year | Option[Instant | LocalDate | Year]] = Year[T]

Attributes

Inherited from:
Alias (hidden)

Value members

Inherited methods

def AUTO_INCREMENT[T <: Byte | Short | Int | Long | BigInt | Option[Byte | Short | Int | Long | BigInt]]: AutoInc[T]

Attributes

Inherited from:
Alias (hidden)
inline def BIGINT[T <: Long | BigInt | Option[Long | BigInt]]: Bigint[T]

Attributes

Inherited from:
DataTypes
inline def BINARY[T <: Array[Byte] | Option[Array[Byte]]](inline length: Int): Binary[T]

Attributes

Inherited from:
DataTypes
inline def BIT[T <: Byte | Short | Int | Long | Option[Byte | Short | Int | Long]]: Bit[T]

Attributes

Inherited from:
DataTypes
inline def BLOB[T <: Array[Byte] | Option[Array[Byte]]](inline length: Long): Blob[T]

Attributes

Inherited from:
DataTypes
inline def BLOB[T <: Array[Byte] | Option[Array[Byte]]](): Blob[T]

Attributes

Inherited from:
DataTypes
inline def BOOLEAN[T <: Boolean | Option[Boolean]]: Bool[T]

Attributes

Inherited from:
DataTypes
inline def CHAR[T <: String | Option[String]](inline length: Int): CChar[T]

===== List of String Data Types =====

===== List of String Data Types =====

Attributes

Inherited from:
DataTypes
def COMMENT[T](message: String): Comment[T]

Attributes

Inherited from:
Alias (hidden)
def CONSTRAINT(symbol: String, key: PrimaryKey | UniqueKey | ForeignKey[_]): Constraint

Attributes

Inherited from:
Alias (hidden)
def CONSTRAINT(key: PrimaryKey | UniqueKey | ForeignKey[_]): Constraint

Attributes

Inherited from:
Alias (hidden)
inline def DATE[T <: String | LocalDate | Option[String | LocalDate]]: Date[T]

===== List of Date Data Types =====

===== List of Date Data Types =====

Attributes

Inherited from:
DataTypes
inline def DATETIME[T <: String | Instant | LocalDateTime | OffsetTime | Option[String | Instant | LocalDateTime | OffsetTime]](inline fsp: 0 | 1 | 2 | 3 | 4 | 5 | 6): DateTime[T]

Attributes

Inherited from:
DataTypes
inline def DATETIME[T <: String | Instant | LocalDateTime | OffsetTime | Option[String | Instant | LocalDateTime | OffsetTime]]: DateTime[T]

Attributes

Inherited from:
DataTypes
inline def DECIMAL[T <: BigDecimal | Option[BigDecimal]](inline accuracy: Int, inline scale: Int): Decimal[T]

Attributes

Inherited from:
DataTypes
inline def DOUBLE[T <: Double | Option[Double]](inline accuracy: Int): CFloat[T]

Attributes

Inherited from:
DataTypes
inline def ENUM[T <: Enum | Option[Enum]](using EnumDataType[_]): Enum[T]

Attributes

Inherited from:
DataTypes
inline def FLOAT[T <: Float | Option[Float]](inline accuracy: Int): CFloat[T]

Attributes

Inherited from:
DataTypes
def FOREIGN_KEY[T <: Tuple](name: Option[String], columns: T, reference: Reference[T])(using IsColumn[T] =:= true): ForeignKey[T]

Attributes

Inherited from:
Alias (hidden)
def FOREIGN_KEY[T <: Tuple](name: String, columns: T, reference: Reference[T])(using IsColumn[T] =:= true): ForeignKey[T]

Attributes

Inherited from:
Alias (hidden)
def FOREIGN_KEY[T <: Tuple](columns: T, reference: Reference[T])(using IsColumn[T] =:= true): ForeignKey[T]

Attributes

Inherited from:
Alias (hidden)
def FOREIGN_KEY[T](name: String, column: Column[T], reference: Reference[Column[T] *: EmptyTuple]): ForeignKey[Column[T] *: EmptyTuple]

Attributes

Inherited from:
Alias (hidden)
def FOREIGN_KEY[T](column: Column[T], reference: Reference[Column[T] *: EmptyTuple]): ForeignKey[Column[T] *: EmptyTuple]

Attributes

Inherited from:
Alias (hidden)
def INDEX_KEY(indexName: Option[String], indexType: Option[Type], indexOption: Option[IndexOption], keyPart: Column[_]*): IndexKey

Attributes

Inherited from:
Alias (hidden)
def INDEX_KEY(keyPart: Column[_]*): IndexKey

Attributes

Inherited from:
Alias (hidden)
inline def INT[T <: Int | Long | Option[Int | Long]]: Integer[T]

Attributes

Inherited from:
DataTypes
def INVISIBLE[T]: InVisible[T]

Attributes

Inherited from:
Alias (hidden)
inline def LONGBLOB[T <: Array[Byte] | Option[Array[Byte]]](): LongBlob[T]

Attributes

Inherited from:
DataTypes
inline def LONGTEXT[T <: String | Option[String]](): LongText[T]

Attributes

Inherited from:
DataTypes
inline def MEDIUMBLOB[T <: Array[Byte] | Option[Array[Byte]]](): Mediumblob[T]

Attributes

Inherited from:
DataTypes
inline def MEDIUMINT[T <: Int | Option[Int]]: Mediumint[T]

Attributes

Inherited from:
DataTypes
inline def MEDIUMTEXT[T <: String | Option[String]](): MediumText[T]

Attributes

Inherited from:
DataTypes
def PRIMARY_KEY(indexType: Type, indexOption: IndexOption, keyPart: Column[_]*): PrimaryKey & Index

Attributes

Inherited from:
Alias (hidden)
def PRIMARY_KEY(keyPart: List[Column[_]], indexOption: IndexOption): PrimaryKey & Index

Attributes

Inherited from:
Alias (hidden)
def PRIMARY_KEY(indexType: Type, keyPart: Column[_]*): PrimaryKey & Index

Attributes

Inherited from:
Alias (hidden)
def PRIMARY_KEY(keyPart: Column[_]*): PrimaryKey & Index

Attributes

Inherited from:
Alias (hidden)
def PRIMARY_KEY(keyPart: Column[_]): PrimaryKey & Index

Attributes

Inherited from:
Alias (hidden)
def PRIMARY_KEY[T]: PrimaryKey & Attribute[T]

Attributes

Inherited from:
Alias (hidden)
def REFERENCE[T <: Tuple](table: Table[_], columns: T)(using IsColumn[T] =:= true): Reference[T]

Attributes

Inherited from:
Alias (hidden)
def REFERENCE[T](table: Table[_], column: Column[T]): Reference[Column[T] *: EmptyTuple]

Attributes

Inherited from:
Alias (hidden)
def SERIAL[T <: BigInt]: Serial[T]

===== List of Alias Date Data Types =====

===== List of Alias Date Data Types =====

Attributes

Inherited from:
DataTypes
inline def SMALLINT[T <: Short | Int | Option[Short | Int]]: Smallint[T]

Attributes

Inherited from:
DataTypes
inline def TEXT[T <: String | Option[String]](): Text[T]

Attributes

Inherited from:
DataTypes
inline def TIME[T <: String | LocalTime | Option[String | LocalTime]](fsp: 0 | 1 | 2 | 3 | 4 | 5 | 6): Time[T]

Attributes

Inherited from:
DataTypes
inline def TIME[T <: String | LocalTime | Option[String | LocalTime]]: Time[T]

Attributes

Inherited from:
DataTypes
inline def TIMESTAMP[T <: String | Instant | LocalDateTime | OffsetDateTime | ZonedDateTime | Option[String | Instant | LocalDateTime | OffsetDateTime | ZonedDateTime]](fsp: 0 | 1 | 2 | 3 | 4 | 5 | 6): TimeStamp[T]

Attributes

Inherited from:
DataTypes
inline def TIMESTAMP[T <: String | Instant | LocalDateTime | OffsetDateTime | ZonedDateTime | Option[String | Instant | LocalDateTime | OffsetDateTime | ZonedDateTime]]: TimeStamp[T]

Attributes

Inherited from:
DataTypes
inline def TINYBLOB[T <: Array[Byte] | Option[Array[Byte]]](): Tinyblob[T]

Attributes

Inherited from:
DataTypes
inline def TINYINT[T <: Byte | Short | Option[Byte | Short]]: Tinyint[T]

Attributes

Inherited from:
DataTypes
inline def TINYTEXT[T <: String | Option[String]](): TinyText[T]

Attributes

Inherited from:
DataTypes
def UNIQUE_KEY(indexName: Option[String], indexType: Option[Type], indexOption: Option[IndexOption], keyPart: Column[_]*): UniqueKey & Index

Attributes

Inherited from:
Alias (hidden)
def UNIQUE_KEY(indexName: String, indexType: Type, indexOption: IndexOption, keyPart: Column[_]*): UniqueKey & Index

Attributes

Inherited from:
Alias (hidden)
def UNIQUE_KEY(indexName: String, indexType: Type, keyPart: Column[_]*): UniqueKey & Index

Attributes

Inherited from:
Alias (hidden)
def UNIQUE_KEY(indexName: String, keyPart: Column[_]*): UniqueKey & Index

Attributes

Inherited from:
Alias (hidden)
def UNIQUE_KEY(keyPart: Column[_]*): UniqueKey & Index

Attributes

Inherited from:
Alias (hidden)
def UNIQUE_KEY[T]: UniqueKey & Attribute[T]

Attributes

Inherited from:
Alias (hidden)
inline def VARBINARY[T <: Array[Byte] | Option[Array[Byte]]](inline length: Int): Varbinary[T]

Attributes

Inherited from:
DataTypes
inline def VARCHAR[T <: String | Option[String]](inline length: Int): Varchar[T]

Attributes

Inherited from:
DataTypes
def VISIBLE[T]: Visible[T]

Attributes

Inherited from:
Alias (hidden)
inline def YEAR[T <: Int | Instant | LocalDate | Year | Option[Int | Instant | LocalDate | Year]]: Year[T]

Attributes

Inherited from:
DataTypes
def column[T](label: String, dataType: DataType[T], attributes: Attribute[T]*): Column[T]

Attributes

Inherited from:
Alias (hidden)
def column[T](label: String, dataType: DataType[T]): Column[T]

Attributes

Inherited from:
Alias (hidden)

Deprecated and Inherited methods

inline def BIGINT[T <: Long | BigInt | Option[Long | BigInt]](inline length: Int): Bigint[T]

Attributes

Deprecated
true
Inherited from:
DataTypes
inline def BIT[T <: Byte | Short | Int | Long | Option[Byte | Short | Int | Long]](inline length: Int): Bit[T]

===== List of Numeric Data Types =====

===== List of Numeric Data Types =====

Attributes

Deprecated
true
Inherited from:
DataTypes
inline def INT[T <: Int | Long | Option[Int | Long]](inline length: Int): Integer[T]

Attributes

Deprecated
true
Inherited from:
DataTypes
inline def MEDIUMINT[T <: Int | Option[Int]](inline length: Int): Mediumint[T]

Attributes

Deprecated
true
Inherited from:
DataTypes
inline def SMALLINT[T <: Short | Int | Option[Short | Int]](inline length: Int): Smallint[T]

Attributes

Deprecated
true
Inherited from:
DataTypes
inline def TINYINT[T <: Byte | Short | Option[Byte | Short]](inline length: Int): Tinyint[T]

Attributes

Deprecated
true
Inherited from:
DataTypes
inline def YEAR[T <: Int | Instant | LocalDate | Year | Option[Int | Instant | LocalDate | Year]](digit: 4): Year[T]

Attributes

Deprecated
true
Inherited from:
DataTypes

Concrete fields

val DataType: DataType.type
val Table: Table.type