SqlStr

scalasql.core.SqlStr
See theSqlStr companion class
object SqlStr

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
SqlStr.type

Members list

Type members

Classlikes

class Flattened(val queryParts: Array[CharSequence], val interps0: Array[Interp], isCompleteQuery: Boolean, val referencedExprs: Array[Identity]) extends SqlStr

Represents a SqlStr that has been flattened out into a single set of parallel arrays, allowing you to render it or otherwise make use of its data.

Represents a SqlStr that has been flattened out into a single set of parallel arrays, allowing you to render it or otherwise make use of its data.

Attributes

Supertypes
class SqlStr
trait Renderable
class Object
trait Matchable
class Any
object Interp

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Interp.type
sealed trait Interp

Something that can be interpolated into a SqlStr.

Something that can be interpolated into a SqlStr.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SqlStrInterp
class TypeInterp[T]
object Renderable

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Renderable.type
trait Renderable

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Expr[T]
class Simple[T]
class SqlStr
class Flattened
implicit class SqlStringSyntax(sc: StringContext)

Provides the sql"..." syntax for constructing SqlStrs

Provides the sql"..." syntax for constructing SqlStrs

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def flatten(self: SqlStr): Flattened

Flattens out a SqlStr into a single flattened SqlStr.Flattened object, at which point you can use its queryParts, params, referencedExprs, etc.

Flattens out a SqlStr into a single flattened SqlStr.Flattened object, at which point you can use its queryParts, params, referencedExprs, etc.

Attributes

def join(strs: IterableOnce[SqlStr], sep: SqlStr): SqlStr

Joins a Seq of SqlStrs into a single SqlStr using the given sep separator

Joins a Seq of SqlStrs into a single SqlStr using the given sep separator

Attributes

def opt[T](t: Option[T])(f: T => SqlStr): SqlStr

Helper method turn an Option[T] into a SqlStr, returning the empty string if the Option is None

Helper method turn an Option[T] into a SqlStr, returning the empty string if the Option is None

Attributes

def optSeq[T](t: Seq[T])(f: Seq[T] => SqlStr): SqlStr

Helper method turn an Seq[T] into a SqlStr, returning the empty string if the Seq is empty

Helper method turn an Seq[T] into a SqlStr, returning the empty string if the Seq is empty

Attributes

def raw(s: String, referencedExprs: Array[Identity]): SqlStr

Converts a raw String into a SqlStr. Note that this must be used carefully to avoid SQL injection attacks.

Converts a raw String into a SqlStr. Note that this must be used carefully to avoid SQL injection attacks.

Attributes

Concrete fields

lazy val commaSep: SqlStr
lazy val empty: SqlStr

Implicits

Implicits

final implicit def SqlStringSyntax(sc: StringContext): SqlStringSyntax

Provides the sql"..." syntax for constructing SqlStrs

Provides the sql"..." syntax for constructing SqlStrs

Attributes