Mysql

ldbc.dsl.Mysql
case class Mysql[F[_]](statement: String, params: List[DynamicBinder])(implicit evidence$1: Temporal[F]) extends SQL

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

Type parameters

F

The effect type

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): SQL

Attributes

Definition Classes
SQL
Source
Mysql.scala
def query[T](using reader: ResultSetReader[F, T]): Query[F, 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
inline def query[P <: Product](using mirror: ProductOf[P]): Query[F, P]

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`, `age` FROM user".query[User]

Attributes

Returns

A ldbc.dsl.Query instance

Source
Mysql.scala
def returning[T <: String | Int | Long](using reader: ResultSetReader[F, T]): Executor[F, 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: Executor[F, 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

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product