QueryQueryable

scalasql.query.Query.QueryQueryable
class QueryQueryable[Q <: Query[R], R]() extends Queryable[Q, R]

The default Queryable instance for any Query. Delegates the implementation of the Queryable methods to abstract methods on the Query, to allow easy overrides and subclassing of Query classes

Attributes

Graph
Supertypes
trait Queryable[Q, R]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def construct(q: Q, args: ResultSetIterator): R

Construct a Scala return value from the Queryable.ResultSetIterator representing the return value of this queryable value

Construct a Scala return value from the Queryable.ResultSetIterator representing the return value of this queryable value

Attributes

Definition Classes
Queryable
override def isExecuteUpdate(q: Q): Boolean

Whether this queryable value is executed using java.sql.Statement.executeUpdate instead of .executeQuery. Note that this needs to be known ahead of time, and cannot be discovered by just calling .execute, because some JDBC drivers do not properly handle updates in the .execute call

Whether this queryable value is executed using java.sql.Statement.executeUpdate instead of .executeQuery. Note that this needs to be known ahead of time, and cannot be discovered by just calling .execute, because some JDBC drivers do not properly handle updates in the .execute call

Attributes

Definition Classes
Queryable
override def isGetGeneratedKeys(q: Q): Option[Row[_, _]]

Whether this queryable value is executed using java.sql.Statement.getGeneratedKeys instead of .executeQuery.

Whether this queryable value is executed using java.sql.Statement.getGeneratedKeys instead of .executeQuery.

Attributes

Definition Classes
Queryable
override def isSingleRow(q: Q): Boolean

Whether this query expects a single row to be returned, if so we can assert on the number of rows and raise an error if 0 rows or 2+ rows are present

Whether this query expects a single row to be returned, if so we can assert on the number of rows and raise an error if 0 rows or 2+ rows are present

Attributes

Definition Classes
Queryable
def renderSql(q: Q, ctx: Context): SqlStr

Converts the given queryable value into a SqlStr, that can then be executed by the underlying SQL JDBC interface

Converts the given queryable value into a SqlStr, that can then be executed by the underlying SQL JDBC interface

Attributes

override def walkExprs(q: Q): Seq[Expr[_]]

Returns a sequence of expressions created by this queryable value. Used to generate the column list SELECT clauses, both for nested and top level SELECTs

Returns a sequence of expressions created by this queryable value. Used to generate the column list SELECT clauses, both for nested and top level SELECTs

Attributes

Definition Classes
Queryable
override def walkLabels(q: Q): Seq[List[String]]

Returns a sequence of labels, each represented by a list of tokens, representing the expressions created by this queryable value. Used to add AS foo_bar labels to the generated queries, to aid in readability

Returns a sequence of labels, each represented by a list of tokens, representing the expressions created by this queryable value. Used to add AS foo_bar labels to the generated queries, to aid in readability

Attributes

Definition Classes
Queryable

Inherited methods

def walkLabelsAndExprs(q: Q): Walked

Attributes

Inherited from:
Queryable