Mysql

ldbc.dsl.Mysql
case class Mysql(statement: String, params: List[Dynamic]) extends SQL

A model with a query string and parameters to be bound to the query string that is executed by PreparedStatement, etc.

Value parameters

params

statement has '?' that the statement has.

statement

an SQL statement that may contain one or more '?' IN parameter placeholders

Attributes

Source
Mysql.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait SQL
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def ++(sql: SQL): Mysql

Attributes

Definition Classes
SQL
Source
Mysql.scala
def query[T](using decoder: Decoder[T]): Query[T]

A method to convert a query to a ldbc.dsl.Query.

A method to convert a query to a ldbc.dsl.Query.

 sql"SELECT `name` FROM user".query[String]

Attributes

Returns

A ldbc.dsl.Query instance

Source
Mysql.scala
def returning[T <: String | Int | Long](using decoder: Decoder[T]): DBIO[T]

A method to execute an insert operation against the MySQL server.

A method to execute an insert operation against the MySQL server.

 sql"INSERT INTO user (`name`, `age`) VALUES (${("Alice", 20)})".returning[Long]

Type parameters

T

The type of the primary key

Attributes

Returns

The primary key value

Source
Mysql.scala
def update: DBIO[Int]

A method to execute an update operation against the MySQL server.

A method to execute an update operation against the MySQL server.

 sql"UPDATE user SET `name` = ${"Alice"} WHERE `id` = ${1L}".update

Attributes

Returns

The number of rows updated

Source
Mysql.scala

Inherited methods

protected def paramBind[F[_] : MonadThrow](prepareStatement: PreparedStatement[F], params: List[Dynamic]): F[Unit]

Attributes

Inherited from:
ParamBinder (hidden)
Source
package.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product