scalasql.core

package scalasql.core

Members list

Packages

Type members

Classlikes

trait Aggregatable[Q] extends WithSqlExpr[Q]

Something that supports aggregate operations. Most commonly a Select, but also could be a Aggregatable.Proxy

Something that supports aggregate operations. Most commonly a Select, but also could be a Aggregatable.Proxy

Attributes

Companion
object
Supertypes
trait WithSqlExpr[Q]
class Object
trait Matchable
class Any
Known subtypes
class Proxy[Q]
object Aggregatable

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait Config

Things you to do to configure ScalaSql

Things you to do to configure ScalaSql

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Config

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Config.type
trait Context

The contextual information necessary for rendering a ScalaSql query or expression into a SQL string

The contextual information necessary for rendering a ScalaSql query or expression into a SQL string

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Impl
object Context

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Context.type
trait DbApi extends AutoCloseable

An interface to the SQL database allowing you to run queries.

An interface to the SQL database allowing you to run queries.

Attributes

Companion
object
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes
trait Txn
class Impl
object DbApi

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
DbApi.type
trait DbClient

A database client. Primarily allows you to access the database within a transaction block or via getAutoCommitClientConnection

A database client. Primarily allows you to access the database within a transaction block or via getAutoCommitClientConnection

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Connection
class DataSource
object DbClient

Attributes

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type

A default set of data type mappers that need to be present in any ScalaSql dialect

A default set of data type mappers that need to be present in any ScalaSql dialect

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Expr[T] extends Renderable

A single "value" in your SQL query that can be mapped to and from a Scala value of a particular type T

A single "value" in your SQL query that can be mapped to and from a Scala value of a particular type T

Attributes

Companion
object
Supertypes
trait Renderable
class Object
trait Matchable
class Any
Known subtypes
class Simple[T]
object Expr

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Expr.type
object ExprsToSql

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ExprsToSql.type
class FastAccumulator[T](startSize: Int)(using evidence$1: ClassTag[T])

Attributes

Supertypes
class Object
trait Matchable
class Any
trait JoinNullable[Q]

Represents a set of nullable columns that come from a LEFT/RIGHT/OUTER JOIN clause.

Represents a set of nullable columns that come from a LEFT/RIGHT/OUTER JOIN clause.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object JoinNullable

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class LiveExprs(val values: Option[Set[Identity]])

Models a set of live Expr expressions which need to be rendered; Expr expressions not in this set can be skipped during rendering to improve the conciseness of the rendered SQL string.

Models a set of live Expr expressions which need to be rendered; Expr expressions not in this set can be skipped during rendering to improve the conciseness of the rendered SQL string.

  • None is used to indicate this is a top-level context and we want all expressions to be rendered

  • Some(set) indicates that only the expressions present in the set need to be rendered, and the rest can be elided.

Typically downstream parts of a SQL query (e.g. the outer SELECT) are rendered before the upstream parts (e.g. FROM (SELECT ...) subqueries), so the LiveExprs from the downstream parts can be used to decide which columns to skip when rendering the upstream parts. The outermost SELECT is rendered using LiveExprs.none since we cannot know what columns end up being used in the application code after the query has finished running, and thus have to preserve all of them

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object LiveExprs

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
LiveExprs.type
trait Queryable[-Q, R]

Typeclass to indicate that we are able to evaluate a query of type Q to return a result of type R. Involves two operations: flattening a structured query to a flat list of expressions via walkLabelsAndExprs, and reading a JSON-ish tree-shaped blob back into a return value via valueReader

Typeclass to indicate that we are able to evaluate a query of type Q to return a result of type R. Involves two operations: flattening a structured query to a flat list of expressions via walkLabelsAndExprs, and reading a JSON-ish tree-shaped blob back into a return value via valueReader

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Row[Q, R]
class ExprQueryable[E, T]
object Queryable

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Queryable.type
class SqlStr(queryParts: Array[CharSequence], interps: Array[Interp], val isCompleteQuery: Boolean, referencedExprs: Array[Identity]) extends Renderable

A SQL query with interpolated ?s expressions and the associated interpolated values, of type Interp. Accumulates SQL snippets, parameters, and referenced expressions in a tree structure to minimize copying overhead, until SqlStr.flatten is called to convert it into a SqlStr.Flattened

A SQL query with interpolated ?s expressions and the associated interpolated values, of type Interp. Accumulates SQL snippets, parameters, and referenced expressions in a tree structure to minimize copying overhead, until SqlStr.flatten is called to convert it into a SqlStr.Flattened

Attributes

Companion
object
Supertypes
trait Renderable
class Object
trait Matchable
class Any
Known subtypes
class Flattened
object SqlStr

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
SqlStr.type
trait TypeMapper[T]

A mapping between a Scala type T and a JDBC type, defined by it's jdbcType, castTypeString, and get and put operations.

A mapping between a Scala type T and a JDBC type, defined by it's jdbcType, castTypeString, and get and put operations.

Defaults are provided for most common Scala primitives, but you can also provide your own by defining an implicit val foo: TypeMapper[T]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
object TypeMapper

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
TypeMapper.type
trait WithSqlExpr[Q]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Aggregatable[Q]
class Proxy[Q]
object WithSqlExpr

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Types

type Sc[T] = T