Row

scalasql.core.Queryable.Row
See theRow companion object
trait Row[Q, R] extends Queryable[Q, R]

A Queryable that represents a part of a single database row. Queryable.Rows can be nested within other Queryables, but Queryables in general cannot. e.g.

  • Select[Int] is valid because Select[Q] takes a Queryable.Row[Q], and there is a Queryable.Row[Int] available

  • Select[Select[Int]] is invalid because although there is a Queryable[Select[Q]] available, there is no Queryable.Row[Select[Q]], as Select[Q] returns multiple rows

Attributes

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

Members list

Value members

Abstract methods

Implicitly added by NullableQueryable
def deconstruct(r: R): Q
Implicitly added by NullableQueryable

Takes the Scala-value of type R and converts it into a database-value of type Q, potentially representing multiple columns. Used for inserting Scala values into INSERT or VALUES clauses

Takes the Scala-value of type R and converts it into a database-value of type Q, potentially representing multiple columns. Used for inserting Scala values into INSERT or VALUES clauses

Attributes

def deconstruct(r: R): Q

Takes the Scala-value of type R and converts it into a database-value of type Q, potentially representing multiple columns. Used for inserting Scala values into INSERT or VALUES clauses

Takes the Scala-value of type R and converts it into a database-value of type Q, potentially representing multiple columns. Used for inserting Scala values into INSERT or VALUES clauses

Attributes

def walkLabels(): Seq[List[String]]
Implicitly added by NullableQueryable
def walkLabels(): Seq[List[String]]

Concrete methods

def construct(q: Q, args: ResultSetIterator): R
Implicitly added by NullableQueryable

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

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

def isExecuteUpdate(q: Q): Boolean
Implicitly added by NullableQueryable

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

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

def isGetGeneratedKeys(q: Q): Option[Row[_, _]]
Implicitly added by NullableQueryable

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

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

def isSingleRow(q: Q): Boolean
Implicitly added by NullableQueryable

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

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

def renderSql(q: Q, ctx: Context): SqlStr
Implicitly added by NullableQueryable

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

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

def walkLabels(q: Q): Seq[List[String]]
Implicitly added by NullableQueryable

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

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

Inherited methods

Implicitly added by NullableQueryable

Attributes

Inherited from:
Queryable

Attributes

Inherited from:
Queryable

Inherited and Abstract methods

def walkExprs(q: Q): Seq[Expr[_]]
Implicitly added by NullableQueryable

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

Inherited from:
Queryable
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

Inherited from:
Queryable