Client

ldbc.connector.net.protocol.PreparedStatement.Client
case class Client[F[_]](socket: PacketSocket[F], initialPacket: InitialPacket, sql: String, utilityCommands: UtilityCommands[F], params: Ref[F, ListMap[Int, Parameter]], batchedArgs: Ref[F, Vector[String]], resetSequenceId: F[Unit], resultSetType: Int, resultSetConcurrency: Int)(implicit evidence$1: Temporal[F], evidence$2: Exchange[F], evidence$3: Tracer[F], ev: MonadError[F, Throwable]) extends SharedPreparedStatement[F]

PreparedStatement for query construction at the client side.

Type parameters

F

the effect type

Value parameters

ev

the effect type class

initialPacket

the initial packet

params

the parameters

resetSequenceId

the reset sequence id

socket

the packet socket

sql

the SQL statement

Attributes

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

Members list

Value members

Concrete methods

override def addBatch(): F[Unit]

Adds a set of parameters to this PreparedStatement object's batch of commands.

Adds a set of parameters to this PreparedStatement object's batch of commands.

Attributes

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

Releases this Statement object's database and LDBC resources immediately instead of waiting for this to happen when it is automatically closed. It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.

Releases this Statement object's database and LDBC resources immediately instead of waiting for this to happen when it is automatically closed. It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.

Calling the method close on a Statement object that is already closed has no effect.

Note: When a Statement object is closed, its current ResultSet object, if one exists, is also closed.

Attributes

Definition Classes
Source
PreparedStatement.scala
override def executeBatch(): F[List[Int]]

Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. The elements in the array returned by the method executeBatch may be one of the following:

Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. The elements in the array returned by the method executeBatch may be one of the following:

  1. A number greater than or equal to zero -- indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command's execution
  2. A value of SUCCESS_NO_INFO -- indicates that the command was processed successfully but that the number of rows affected is unknown

    If one of the commands in a batch update fails to execute properly, this method throws a BatchUpdateException, and a JDBC driver may or may not continue to process the remaining commands in the batch. However, the driver's behavior must be consistent with a particular DBMS, either always continuing to process commands or never continuing to process commands. If the driver continues processing after a failure, the array returned by the method BatchUpdateException.getUpdateCounts will contain as many elements as there are commands in the batch, and at least one of the elements will be the following:

  3. A value of EXECUTE_FAILED -- indicates that the command failed to execute successfully and occurs only if a driver continues to process commands after a command fails

Attributes

Returns

an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.

Definition Classes
Source
PreparedStatement.scala
override def executeQuery(): F[ResultSet[F]]

Executes the specified SQL statement and returns one or more ResultSet objects.

Executes the specified SQL statement and returns one or more ResultSet objects.

Attributes

Definition Classes
Source
PreparedStatement.scala
override def executeUpdate(): F[Int]

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.

Attributes

Definition Classes
Source
PreparedStatement.scala
override def returningAutoGeneratedKey(): F[Int]

Retrieves any auto-generated keys created as a result of executing this Statement object.

Retrieves any auto-generated keys created as a result of executing this Statement object.

Attributes

Definition Classes
Source
PreparedStatement.scala

Inherited methods

override def addBatch(sql: String): F[Unit]

Adds the given SQL command to the current list of commands for this Statement object. The commands in this list can be executed as a batch by calling the method executeBatch.

Adds the given SQL command to the current list of commands for this Statement object. The commands in this list can be executed as a batch by calling the method executeBatch.

Value parameters

sql

typically this is a SQL INSERT or UPDATE statement

Attributes

Definition Classes
Inherited from:
PreparedStatement
Source
PreparedStatement.scala
protected def buildBatchQuery(original: String, params: ListMap[Int, Parameter]): String

Attributes

Inherited from:
SharedPreparedStatement
Source
PreparedStatement.scala
protected def buildQuery(original: String, params: ListMap[Int, Parameter]): String

Attributes

Inherited from:
SharedPreparedStatement
Source
PreparedStatement.scala
def clearBatch(): F[Unit]

Empties this Statement object's current list of SQL commands.

Empties this Statement object's current list of SQL commands.

Attributes

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

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
protected def readUntilEOF[P <: ResponsePacket](decoder: Decoder[P | EOFPacket | ERRPacket], acc: Vector[P]): F[Vector[P]]

Attributes

Inherited from:
SharedPreparedStatement
Source
PreparedStatement.scala
protected def repeatProcess[P <: ResponsePacket](times: Int, decoder: Decoder[P]): F[Vector[P]]

Attributes

Inherited from:
SharedPreparedStatement
Source
PreparedStatement.scala
def setBigDecimal(index: Int, value: Option[BigDecimal]): F[Unit]

Sets the designated parameter to the given Scala.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.

Sets the designated parameter to the given Scala.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setBigDecimal(index: Int, value: BigDecimal): F[Unit]

Sets the designated parameter to the given Scala.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.

Sets the designated parameter to the given Scala.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setBigInt(index: Int, value: Option[BigInt]): F[Unit]

Sets the designated parameter to the given Scala long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

Sets the designated parameter to the given Scala long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setBigInt(index: Int, value: BigInt): F[Unit]

Sets the designated parameter to the given Scala long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

Sets the designated parameter to the given Scala long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setBoolean(index: Int, value: Option[Boolean]): F[Unit]

Sets the designated parameter to the given Scala boolean value. The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.

Sets the designated parameter to the given Scala boolean value. The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setBoolean(index: Int, value: Boolean): F[Unit]

Sets the designated parameter to the given Scala boolean value. The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.

Sets the designated parameter to the given Scala boolean value. The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setByte(index: Int, value: Option[Byte]): F[Unit]

Sets the designated parameter to the given Scala byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.

Sets the designated parameter to the given Scala byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setByte(index: Int, value: Byte): F[Unit]

Sets the designated parameter to the given Scala byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.

Sets the designated parameter to the given Scala byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setBytes(index: Int, value: Option[Array[Byte]]): F[Unit]

Sets the designated parameter to the given Scala array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.

Sets the designated parameter to the given Scala array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setBytes(index: Int, value: Array[Byte]): F[Unit]

Sets the designated parameter to the given Scala array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.

Sets the designated parameter to the given Scala array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setDate(index: Int, value: Option[LocalDate]): F[Unit]

Sets the designated parameter to the given java.time.Date value, using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value, which the driver then sends to the database. With a Calendar object, the driver can calculate the date taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

Sets the designated parameter to the given java.time.Date value, using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value, which the driver then sends to the database. With a Calendar object, the driver can calculate the date taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setDate(index: Int, value: LocalDate): F[Unit]

Sets the designated parameter to the given java.time.Date value, using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value, which the driver then sends to the database. With a Calendar object, the driver can calculate the date taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

Sets the designated parameter to the given java.time.Date value, using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value, which the driver then sends to the database. With a Calendar object, the driver can calculate the date taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setDouble(index: Int, value: Option[Double]): F[Unit]

Sets the designated parameter to the given Scala double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.

Sets the designated parameter to the given Scala double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setDouble(index: Int, value: Double): F[Unit]

Sets the designated parameter to the given Scala double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.

Sets the designated parameter to the given Scala double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setFloat(index: Int, value: Option[Float]): F[Unit]

Sets the designated parameter to the given Scala float value. The driver converts this to an SQL REAL value when it ends it to the database.

Sets the designated parameter to the given Scala float value. The driver converts this to an SQL REAL value when it ends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setFloat(index: Int, value: Float): F[Unit]

Sets the designated parameter to the given Scala float value. The driver converts this to an SQL REAL value when it ends it to the database.

Sets the designated parameter to the given Scala float value. The driver converts this to an SQL REAL value when it ends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setInt(index: Int, value: Option[Int]): F[Unit]

Sets the designated parameter to the given Scala int value. The driver converts this to an SQL INTEGER value when it sends it to the database.

Sets the designated parameter to the given Scala int value. The driver converts this to an SQL INTEGER value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setInt(index: Int, value: Int): F[Unit]

Sets the designated parameter to the given Scala int value. The driver converts this to an SQL INTEGER value when it sends it to the database.

Sets the designated parameter to the given Scala int value. The driver converts this to an SQL INTEGER value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setLong(index: Int, value: Option[Long]): F[Unit]

Sets the designated parameter to the given Scala long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

Sets the designated parameter to the given Scala long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setLong(index: Int, value: Long): F[Unit]

Sets the designated parameter to the given Scala long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

Sets the designated parameter to the given Scala long value. The driver converts this to an SQL BIGINT value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setNull(index: Int): F[Unit]

Sets the designated parameter to SQL NULL.

Sets the designated parameter to SQL NULL.

Value parameters

index

the first parameter is 1, the second is 2, ...

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setShort(index: Int, value: Option[Short]): F[Unit]

Sets the designated parameter to the given Scala short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.

Sets the designated parameter to the given Scala short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setShort(index: Int, value: Short): F[Unit]

Sets the designated parameter to the given Scala short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.

Sets the designated parameter to the given Scala short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setString(index: Int, value: Option[String]): F[Unit]

Sets the designated parameter to the given Scala String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.

Sets the designated parameter to the given Scala String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setString(index: Int, value: String): F[Unit]

Sets the designated parameter to the given Scala String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.

Sets the designated parameter to the given Scala String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setTime(index: Int, value: Option[LocalTime]): F[Unit]

Sets the designated parameter to the given java.time.Time value. The driver converts this to an SQL TIME value when it sends it to the database.

Sets the designated parameter to the given java.time.Time value. The driver converts this to an SQL TIME value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setTime(index: Int, value: LocalTime): F[Unit]

Sets the designated parameter to the given java.time.Time value. The driver converts this to an SQL TIME value when it sends it to the database.

Sets the designated parameter to the given java.time.Time value. The driver converts this to an SQL TIME value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setTimestamp(index: Int, value: Option[LocalDateTime]): F[Unit]

Sets the designated parameter to the given java.time.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

Sets the designated parameter to the given java.time.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setTimestamp(index: Int, value: LocalDateTime): F[Unit]

Sets the designated parameter to the given java.time.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

Sets the designated parameter to the given java.time.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setYear(index: Int, value: Option[Year]): F[Unit]

Sets the designated parameter to the given java.time.Year value. The driver converts this to an SQL YEAR value when it sends it to the database.

Sets the designated parameter to the given java.time.Year value. The driver converts this to an SQL YEAR value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala
def setYear(index: Int, value: Year): F[Unit]

Sets the designated parameter to the given java.time.Year value. The driver converts this to an SQL YEAR value when it sends it to the database.

Sets the designated parameter to the given java.time.Year value. The driver converts this to an SQL YEAR value when it sends it to the database.

Value parameters

index

the first parameter is 1, the second is 2, ...

value

the parameter value

Attributes

Inherited from:
PreparedStatement
Source
PreparedStatement.scala

Deprecated and Inherited methods

override def executeQuery(sql: String): F[ResultSet[F]]

Executes the specified SQL statement and returns one or more ResultSet objects.

Executes the specified SQL statement and returns one or more ResultSet objects.

Value parameters

sql

an SQL statement to be sent to the database, typically a static SQL SELECT statement

Attributes

Deprecated
true
Definition Classes
Inherited from:
PreparedStatement
Source
PreparedStatement.scala
override def executeUpdate(sql: String): F[Int]

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.

Attributes

Deprecated
true
Definition Classes
Inherited from:
PreparedStatement
Source
PreparedStatement.scala
override def returningAutoGeneratedKey(sql: String): F[Int]

Retrieves any auto-generated keys created as a result of executing this Statement object.

Retrieves any auto-generated keys created as a result of executing this Statement object.

Attributes

Deprecated
true
Definition Classes
Inherited from:
PreparedStatement
Source
PreparedStatement.scala