CommandSyntax

ldbc.query.builder.syntax.CommandSyntax
trait CommandSyntax[F[_]]

Attributes

Source
CommandSyntax.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Extensions

Extensions

extension (command: Command)
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.

 Table[User]
   .insertInto(user => (user.name, user.age))
   .values(("Alice", 20))
   .returning[Long]

Type parameters

T

The type of the primary key

Attributes

Returns

The primary key value

Source
CommandSyntax.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.

 Table[User]
   .update("id", 1L)
   .set("name", "Alice")
   .set("age", 20)
   .where(_.id === 1L)
   .update

Attributes

Returns

The number of rows updated

Source
CommandSyntax.scala