Sql

usql.Sql
case class Sql(parts: Seq[(String, SqlInterpolationParameter)]) extends SqlBase

SQL with already embedded parameters.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait SqlBase
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

inline def +(other: Sql): Sql
def collectAliases: Set[String]

Collect aliases within this SQL

Collect aliases within this SQL

Attributes

def concat(other: Sql): Sql
def mapAliases(map: Map[String, String]): Sql

Map aliases to a new name.

Map aliases to a new name.

Attributes

def parameters: Seq[SqlParameter[_]]

Collect embedded parameters.

Collect embedded parameters.

Attributes

def serializeSql(s: StringBuilder): Unit

Simplify long random generated aliases.

Simplify long random generated aliases.

Attributes

def sql: String

Converts to SQL Text.

Converts to SQL Text.

Attributes

def stripMargin(marginChar: Char): Sql
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
override def withPreparedStatement[T](f: PreparedStatement => T)(using cp: ConnectionProvider, sp: StatementPreparator): T

Prepares a statement which can then be further filled or executed.

Prepares a statement which can then be further filled or executed.

Attributes

Definition Classes

Inherited methods

def batch[T](values: Iterable[T])(using p: RowEncoder[T]): Batch[T]

Turns into a batch operation

Turns into a batch operation

Attributes

Inherited from:
SqlBase
def execute()(using ConnectionProvider): Boolean

Raw Executes this statement.

Raw Executes this statement.

Attributes

Inherited from:
SqlBase
def one[T](value: T)(using p: RowEncoder[T]): AppliedSql[T]

Turns into a update on one value set.

Turns into a update on one value set.

Attributes

Inherited from:
SqlBase
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def query[T](using rowDecoder: RowDecoder[T]): Query[T]

Turns into a query

Turns into a query

Attributes

Inherited from:
SqlBase
def queryAll[T]()(using rowDecoder: RowDecoder[T], cp: ConnectionProvider): Vector[T]

Shortcut for query all.

Shortcut for query all.

Attributes

Inherited from:
SqlBase
def queryOne[T]()(using rowDecoder: RowDecoder[T], cp: ConnectionProvider): Option[T]

Shortcut for query one.

Shortcut for query one.

Attributes

Inherited from:
SqlBase
def update: Update

Turns into an update.

Turns into an update.

Attributes

Inherited from:
SqlBase