com.lucidchart.relate

InterpolatedQuery

class InterpolatedQuery extends Sql with MultipleParameter

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. InterpolatedQuery
  2. MultipleParameter
  3. Parameter
  4. Sql
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InterpolatedQuery(parsedQuery: String, params: Seq[Parameter])

Type Members

  1. class BaseStatement extends AnyRef

    Attributes
    protected[com.lucidchart.relate]
    Definition Classes
    Sql

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(query: InterpolatedQuery): InterpolatedQuery

  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. def appendPlaceholders(stringBuilder: StringBuilder): Unit

    Definition Classes
    InterpolatedQueryParameter
  8. def applyParams(stmt: PreparedStatement): Unit

    Attributes
    protected
    Definition Classes
    InterpolatedQuerySql
  9. def as[A]()(implicit arg0: RowParser[A], connection: Connection): A

    Definition Classes
    Sql
  10. def asCollection[U, T[_]]()(implicit arg0: RowParser[U], cbf: CanBuildFrom[T[U], U, T[U]], connection: Connection): T[U]

    Definition Classes
    Sql
  11. def asCollection[U, T[_]](parser: (SqlRow) ⇒ U)(implicit cbf: CanBuildFrom[T[U], U, T[U]], connection: Connection): T[U]

    Execute this query and get back the result as an arbitrary collection of records

    Execute this query and get back the result as an arbitrary collection of records

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as an arbitrary collection of records

    Definition Classes
    Sql
  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def asIterable[A]()(implicit arg0: RowParser[A], connection: Connection): Iterable[A]

    Definition Classes
    Sql
  14. def asIterable[A](parser: (SqlRow) ⇒ A)(implicit connection: Connection): Iterable[A]

    Execute this query and get back the result as an iterable of records

    Execute this query and get back the result as an iterable of records

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as an iterable of records

    Definition Classes
    Sql
  15. def asIterator[A](parser: (SqlRow) ⇒ A, fetchSize: Int = 100)(implicit connection: Connection): Iterator[A]

    The asIterator method returns an Iterator that will stream data out of the database.

    The asIterator method returns an Iterator that will stream data out of the database. This avoids an OutOfMemoryError when dealing with large datasets. Bear in mind that many JDBC implementations will not allow additional queries to the connection before all records in the Iterator have been retrieved.

    parser

    the RowParser to parse rows with

    fetchSize

    the number of rows to fetch at a time, defaults to 100. If the JDBC Driver is MySQL, the fetchSize will always default to Int.MinValue, as MySQL's JDBC implementation ignores all other fetchSize values and only streams if fetchSize is Int.MinValue

    Definition Classes
    Sql
  16. def asList[A]()(implicit arg0: RowParser[A], connection: Connection): List[A]

    Definition Classes
    Sql
  17. def asList[A](parser: (SqlRow) ⇒ A)(implicit connection: Connection): List[A]

    Execute this query and get back the result as a List of records

    Execute this query and get back the result as a List of records

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as a List of records

    Definition Classes
    Sql
  18. def asMap[U, V]()(implicit connection: Connection, p: RowParser[(U, V)]): Map[U, V]

    Definition Classes
    Sql
  19. def asMap[U, V](parser: (SqlRow) ⇒ (U, V))(implicit connection: Connection): Map[U, V]

    Execute this query and get back the result as a Map of records

    Execute this query and get back the result as a Map of records

    parser

    the RowParser to use when parsing the result set. The RowParser should return a Tuple of size 2 containing the key and value

    connection

    the connection to use when executing the query

    returns

    the results as a Map of records

    Definition Classes
    Sql
  20. def asMultiMap[U, V]()(implicit connection: Connection, p: RowParser[(U, V)]): Map[U, Set[V]]

    Definition Classes
    Sql
  21. def asMultiMap[U, V](parser: (SqlRow) ⇒ (U, V))(implicit connection: Connection): Map[U, Set[V]]

    Definition Classes
    Sql
  22. def asPairCollection[U, V, T[_, _]]()(implicit cbf: CanBuildFrom[T[U, V], (U, V), T[U, V]], connection: Connection, p: RowParser[(U, V)]): T[U, V]

    Definition Classes
    Sql
  23. def asPairCollection[U, V, T[_, _]](parser: (SqlRow) ⇒ (U, V))(implicit cbf: CanBuildFrom[T[U, V], (U, V), T[U, V]], connection: Connection): T[U, V]

    Execute this query and get back the result as an arbitrary collection of key value pairs

    Execute this query and get back the result as an arbitrary collection of key value pairs

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as an arbitrary collection of key value pairs

    Definition Classes
    Sql
  24. def asScalar[A]()(implicit connection: Connection): A

    Execute this query and get back the result as a single value.

    Execute this query and get back the result as a single value. Assumes that there is only one row and one value in the result set.

    connection

    the connection to use when executing the query

    returns

    the results as a single value

    Definition Classes
    Sql
  25. def asScalarOption[A]()(implicit connection: Connection): Option[A]

    Execute this query and get back the result as an optional single value.

    Execute this query and get back the result as an optional single value. Assumes that there is only one row and one value in the result set.

    connection

    the connection to use when executing the query

    returns

    the results as an optional single value

    Definition Classes
    Sql
  26. def asSeq[A]()(implicit arg0: RowParser[A], connection: Connection): Seq[A]

    Definition Classes
    Sql
  27. def asSeq[A](parser: (SqlRow) ⇒ A)(implicit connection: Connection): Seq[A]

    Execute this query and get back the result as a sequence of records

    Execute this query and get back the result as a sequence of records

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as a sequence of records

    Definition Classes
    Sql
  28. def asSet[A]()(implicit arg0: RowParser[A], connection: Connection): Set[A]

    Definition Classes
    Sql
  29. def asSet[A](parser: (SqlRow) ⇒ A)(implicit connection: Connection): Set[A]

    Execute this query and get back the result as a Set of records

    Execute this query and get back the result as a Set of records

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as a Set of records

    Definition Classes
    Sql
  30. def asSingle[A]()(implicit arg0: RowParser[A], connection: Connection): A

    Definition Classes
    Sql
  31. def asSingle[A](parser: (SqlRow) ⇒ A)(implicit connection: Connection): A

    Execute this query and get back the result as a single record

    Execute this query and get back the result as a single record

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as a single record

    Definition Classes
    Sql
  32. def asSingleOption[A]()(implicit arg0: RowParser[A], connection: Connection): Option[A]

    Definition Classes
    Sql
  33. def asSingleOption[A](parser: (SqlRow) ⇒ A)(implicit connection: Connection): Option[A]

    Execute this query and get back the result as an optional single record

    Execute this query and get back the result as an optional single record

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as an optional single record

    Definition Classes
    Sql
  34. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  37. def execute()(implicit connection: Connection): Boolean

    Execute a statement

    Execute a statement

    connection

    the db connection to use when executing the query

    returns

    whether the query succeeded in its execution

    Definition Classes
    Sql
  38. def executeInsertCollection[U, T[_]](parser: (SqlRow) ⇒ U)(implicit cbf: CanBuildFrom[T[U], U, T[U]], connection: Connection): T[U]

    Execute the query and get the auto-incremented keys using a RowParser.

    Execute the query and get the auto-incremented keys using a RowParser. Provided for the case that a primary key is not an Int or BigInt

    parser

    the RowParser that can parse the returned keys

    connection

    the connection to use when executing the query

    returns

    the auto-incremented keys

    Definition Classes
    Sql
  39. def executeInsertInt()(implicit connection: Connection): Int

    Execute the query and get the auto-incremented key as an Int

    Execute the query and get the auto-incremented key as an Int

    connection

    the connection to use when executing the query

    returns

    the auto-incremented key as an Int

    Definition Classes
    Sql
  40. def executeInsertInts()(implicit connection: Connection): List[Int]

    Execute the query and get the auto-incremented keys as a List of Ints

    Execute the query and get the auto-incremented keys as a List of Ints

    connection

    the connection to use when executing the query

    returns

    the auto-incremented keys as a List of Ints

    Definition Classes
    Sql
  41. def executeInsertLong()(implicit connection: Connection): Long

    Execute the query and get the auto-incremented key as a Long

    Execute the query and get the auto-incremented key as a Long

    connection

    the connection to use when executing the query

    returns

    the auto-incremented key as a Long

    Definition Classes
    Sql
  42. def executeInsertLongs()(implicit connection: Connection): List[Long]

    Execute the query and get the auto-incremented keys as a a List of Longs

    Execute the query and get the auto-incremented keys as a a List of Longs

    connection

    the connection to use when executing the query

    returns

    the auto-incremented keys as a a List of Longs

    Definition Classes
    Sql
  43. def executeInsertSingle[U](parser: (SqlRow) ⇒ U)(implicit connection: Connection): U

    Execute the query and get the auto-incremented key using a RowParser.

    Execute the query and get the auto-incremented key using a RowParser. Provided for the case that a primary key is not an Int or BigInt

    parser

    the RowParser that can parse the returned key

    connection

    the connection to use when executing the query

    returns

    the auto-incremented key

    Definition Classes
    Sql
  44. def executeUpdate()(implicit connection: Connection): Int

    Execute an update

    Execute an update

    connection

    the db connection to use when executing the query

    returns

    the number of rows update by the query

    Definition Classes
    Sql
  45. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  46. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  47. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  48. def insertionStatement(implicit connection: Connection): BaseStatement with InsertionStatementPreparer

    Attributes
    protected
    Definition Classes
    Sql
  49. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  50. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  51. def normalStatement(implicit connection: Connection): BaseStatement with NormalStatementPreparer

    Attributes
    protected
    Definition Classes
    Sql
  52. final def notify(): Unit

    Definition Classes
    AnyRef
  53. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  54. def parameterize(statement: PreparedStatement, i: Int): Int

    Definition Classes
    MultipleParameterParameter
  55. val params: Seq[Parameter]

    Attributes
    protected
    Definition Classes
    InterpolatedQueryMultipleParameter
  56. val parsedQuery: String

    Attributes
    protected
    Definition Classes
    InterpolatedQuerySql
  57. def results()(implicit connection: Connection): ResultSet

    Provides direct access to the underlying java.

    Provides direct access to the underlying java.sql.ResultSet. Note that this ResultSet must be closed manually or by wrapping it in SqlResult.

    val results = SQL(query).results()
    . . .
    SqlResult(results).asList[A](parser)
    // or
    results.close()
    returns

    java.sql.ResultSet

    Definition Classes
    Sql
  58. def statementString(implicit connection: Connection): String

    Calls PreparedStatement#toString, which for many JDBC implementations is the SQL query after parameter substitution.

    Calls PreparedStatement#toString, which for many JDBC implementations is the SQL query after parameter substitution. This is intended primarily for ad-hoc debugging.

    For more routine logging, consider other solutions, such as log4jdbc.

    Definition Classes
    Sql
  59. def streamedStatement(fetchSize: Int)(implicit connection: Connection): BaseStatement with StreamedStatementPreparer

    Attributes
    protected
    Definition Classes
    Sql
  60. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  61. def toString(): String

    Returns the SQL query, before parameter substitution.

    Returns the SQL query, before parameter substitution.

    Definition Classes
    Sql → AnyRef → Any
  62. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. def withTimeout(seconds: Int): InterpolatedQuery

Inherited from MultipleParameter

Inherited from Parameter

Inherited from Sql

Inherited from AnyRef

Inherited from Any

Ungrouped