ConnectionImpl

ldbc.connector.Connection.ConnectionImpl
case class ConnectionImpl[F[_]](protocol: MySQLProtocol[F], readOnly: Ref[F, Boolean], autoCommit: Ref[F, Boolean])(implicit evidence$1: Temporal[F], evidence$2: Tracer[F], evidence$3: Console[F], ev: MonadError[F, Throwable]) extends Connection[F]

Attributes

Source
Connection.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Connection[F]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def changeUser(user: String, password: String): F[Unit]

Changes the user and password for this connection.

Changes the user and password for this connection.

Value parameters

password

the new password

user

the new user name

Attributes

Definition Classes
Source
Connection.scala
override def clientPreparedStatement(sql: String): F[Client[F]]

Creates a client-side prepared statement with the given SQL.

Creates a client-side prepared statement with the given SQL.

Value parameters

sql

SQL queries based on text protocols

Attributes

Definition Classes
Source
Connection.scala
override def clientPreparedStatement(sql: String, resultSetType: Int, resultSetConcurrency: Int): F[Client[F]]

Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Value parameters

resultSetConcurrency

resultSetConcurrency

resultSetType

resultSetType

sql

statement

Attributes

Returns

prepared statement

Definition Classes
Source
Connection.scala
override def close(): F[Unit]

Releases this Connection object's database and LDBC resources immediately instead of waiting for them to be automatically released.

Releases this Connection object's database and LDBC resources immediately instead of waiting for them to be automatically released.

Calling the method close on a Connection object that is already closed is a no-op.

It is strongly recommended that an application explicitly commits or rolls back an active transaction prior to calling the close method. If the close method is called and there is an active transaction, the results are implementation-defined.

Attributes

Definition Classes
Source
Connection.scala
override def commit(): F[Unit]

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.

Attributes

Definition Classes
Source
Connection.scala
override def createStatement(): F[Statement[F]]

Creates a Statement object for sending SQL statements to the database. SQL statements without parameters are normally executed using Statement objects. If the same SQL statement is executed many times, it may be more efficient to use a PreparedStatement object.

Creates a Statement object for sending SQL statements to the database. SQL statements without parameters are normally executed using Statement objects. If the same SQL statement is executed many times, it may be more efficient to use a PreparedStatement object.

Attributes

Definition Classes
Source
Connection.scala
override def createStatement(resultSetType: Int, resultSetConcurrency: Int): F[Statement[F]]

Creates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above, but it allows the default result set type and concurrency to be overridden. The holdability of the created result sets can be determined by calling [[#getHoldability]].

Creates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above, but it allows the default result set type and concurrency to be overridden. The holdability of the created result sets can be determined by calling [[#getHoldability]].

Value parameters

resultSetConcurrency

a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE

resultSetType

a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE

Attributes

Returns

a new Statement object that will generate ResultSet objects with the given type and concurrency

Definition Classes
Source
Connection.scala
override def getAutoCommit: F[Boolean]

Retrieves the current auto-commit mode for this Connection object.

Retrieves the current auto-commit mode for this Connection object.

Attributes

Returns

the current state of this Connection object's auto-commit mode

Definition Classes
Source
Connection.scala
override def getSchema: F[String]

Retrieves this Connection object's current schema name.

Retrieves this Connection object's current schema name.

Attributes

Returns

the current schema name or null if there is none

Definition Classes
Source
Connection.scala
override def getStatistics: F[StatisticsPacket]

Retrieves the statistics of this Connection object.

Retrieves the statistics of this Connection object.

Attributes

Returns

the statistics of this Connection object

Definition Classes
Source
Connection.scala

Retrieves this Connection object's current transaction isolation level.

Retrieves this Connection object's current transaction isolation level.

Attributes

Returns

the current transaction isolation level, which will be one of the following constants: Connection.TransactionIsolationLevel.READ_UNCOMMITTED, Connection.TransactionIsolationLevel.READ_COMMITTED, Connection.TransactionIsolationLevel.REPEATABLE_READ, or Connection.TransactionIsolationLevel.SERIALIZABLE

Definition Classes
Source
Connection.scala
override def isReadOnly: F[Boolean]

Retrieves whether this Connection object is in read-only mode.

Retrieves whether this Connection object is in read-only mode.

Attributes

Returns

true if this Connection object is read-only; false otherwise

Definition Classes
Source
Connection.scala
override def isValid: F[Boolean]

Returns true if the connection has not been closed and is still valid.

Returns true if the connection has not been closed and is still valid.

Attributes

Definition Classes
Source
Connection.scala
override def releaseSavepoint(savepoint: Savepoint): F[Unit]

Removes the specified Savepoint and subsequent Savepoint objects from the current transaction. Any reference to the savepoint after it have been removed will cause an SQLException to be thrown.

Removes the specified Savepoint and subsequent Savepoint objects from the current transaction. Any reference to the savepoint after it have been removed will cause an SQLException to be thrown.

Value parameters

savepoint

the Savepoint object to release

Attributes

Definition Classes
Source
Connection.scala
override def resetServerState: F[Unit]

Resets the server-side state of this connection.

Resets the server-side state of this connection.

Attributes

Definition Classes
Source
Connection.scala
override def rollback(): F[Unit]

Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.

Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.

Attributes

Definition Classes
Source
Connection.scala
override def rollback(savepoint: Savepoint): F[Unit]

Undoes all changes made after the given Savepoint object was set. This method should be used only when auto-commit has been disabled.

Undoes all changes made after the given Savepoint object was set. This method should be used only when auto-commit has been disabled.

Value parameters

savepoint

the Savepoint object to roll back to

Attributes

Definition Classes
Source
Connection.scala
override def serverPreparedStatement(sql: String): F[Server[F]]

Creates a server prepared statement with the given SQL.

Creates a server prepared statement with the given SQL.

Value parameters

sql

SQL queries based on text protocols

Attributes

Definition Classes
Source
Connection.scala
override def serverPreparedStatement(sql: String, resultSetType: Int, resultSetConcurrency: Int): F[Server[F]]

Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Value parameters

resultSetConcurrency

resultSetConcurrency

resultSetType

resultSetType

sql

statement

Attributes

Returns

prepared statement

Definition Classes
Source
Connection.scala
override def setAutoCommit(isAutoCommit: Boolean): F[Unit]

Sets this connection's auto-commit mode to the given state. If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default, new connections are in auto-commit mode.

Sets this connection's auto-commit mode to the given state. If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default, new connections are in auto-commit mode.

Value parameters

isAutoCommit

true to enable auto-commit mode; false to disable it

Attributes

Definition Classes
Source
Connection.scala
override def setOption(optionOperation: EnumMySQLSetOption): F[Unit]

Controls whether or not multiple SQL statements are allowed to be executed at once.

Controls whether or not multiple SQL statements are allowed to be executed at once.

NOTE: It can only be used for batch processing with Insert, Update, and Delete statements.

Value parameters

optionOperation

EnumMySQLSetOption.MYSQL_OPTION_MULTI_STATEMENTS_ON or EnumMySQLSetOption.MYSQL_OPTION_MULTI_STATEMENTS_OFF

Attributes

Definition Classes
Source
Connection.scala
override def setReadOnly(isReadOnly: Boolean): F[Unit]

Puts this connection in read-only mode as a hint to the driver to enable database optimizations.

Puts this connection in read-only mode as a hint to the driver to enable database optimizations.

Value parameters

isReadOnly

true enables read-only mode; false disables it

Attributes

Definition Classes
Source
Connection.scala
override def setSavepoint(): F[Savepoint]

Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it. if setSavepoint is invoked outside of an active transaction, a transaction will be started at this newly created savepoint.

Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it. if setSavepoint is invoked outside of an active transaction, a transaction will be started at this newly created savepoint.

Attributes

Returns

the new Savepoint object

Definition Classes
Source
Connection.scala
override def setSavepoint(name: String): F[Savepoint]

Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it. if setSavepoint is invoked outside of an active transaction, a transaction will be started at this newly created savepoint.

Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it. if setSavepoint is invoked outside of an active transaction, a transaction will be started at this newly created savepoint.

Value parameters

name

a String containing the name of the savepoint

Attributes

Returns

the new Savepoint object

Definition Classes
Source
Connection.scala
override def setSchema(schema: String): F[Unit]

Sets the schema name that will be used for subsequent queries.

Sets the schema name that will be used for subsequent queries.

Calling setSchema has no effect on previously created or prepared Statement objects. It is implementation defined whether a DBMS prepare operation takes place immediately when the Connection method statement or clientPreparedStatement, serverPreparedStatement is invoked. For maximum portability, setSchema should be called before a Statement is created or prepared.

Value parameters

schema

the name of a schema in which to work

Attributes

Definition Classes
Source
Connection.scala
override def setTransactionIsolation(level: TransactionIsolationLevel): F[Unit]

Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.

Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.

Value parameters

level

one of the following Connection constants: Connection.TransactionIsolationLevel.READ_UNCOMMITTED, Connection.TransactionIsolationLevel.READ_COMMITTED, Connection.TransactionIsolationLevel.REPEATABLE_READ, or Connection.TransactionIsolationLevel.SERIALIZABLE

Attributes

Definition Classes
Source
Connection.scala

Inherited methods

def disableMultiQueries: F[Unit]

Disables multiple SQL statements to be executed at once.

Disables multiple SQL statements to be executed at once.

NOTE: It can only be used for batch processing with Insert, Update, and Delete statements.

Attributes

Inherited from:
Connection
Source
Connection.scala
def enableMultiQueries: F[Unit]

Enables multiple SQL statements to be executed at once.

Enables multiple SQL statements to be executed at once.

NOTE: It can only be used for batch processing with Insert, Update, and Delete statements.

Attributes

Inherited from:
Connection
Source
Connection.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product