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
the RowParser to use when parsing the result set
the connection to use when executing the query
the results as an arbitrary collection of records
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
the RowParser to use when parsing the result set
the connection to use when executing the query
the results as an iterable of records
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.
the RowParser to parse rows with
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
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
the RowParser to use when parsing the result set
the connection to use when executing the query
the results as a List of records
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
the RowParser to use when parsing the result set. The RowParser should return a Tuple of size 2 containing the key and value
the connection to use when executing the query
the results as a Map of records
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
the RowParser to use when parsing the result set
the connection to use when executing the query
the results as an arbitrary collection of key value pairs
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.
the connection to use when executing the query
the results as a single value
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.
the connection to use when executing the query
the results as an optional single value
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
the RowParser to use when parsing the result set
the connection to use when executing the query
the results as a sequence of records
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
the RowParser to use when parsing the result set
the connection to use when executing the query
the results as a Set of records
Execute this query and get back the result as a single record
Execute this query and get back the result as a single record
the RowParser to use when parsing the result set
the connection to use when executing the query
the results as a single record
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
the RowParser to use when parsing the result set
the connection to use when executing the query
the results as an optional single record
Execute a statement
Execute a statement
the db connection to use when executing the query
whether the query succeeded in its execution
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
the RowParser that can parse the returned keys
the connection to use when executing the query
the auto-incremented keys
Execute the query and get the auto-incremented key as an Int
Execute the query and get the auto-incremented key as an Int
the connection to use when executing the query
the auto-incremented key as an 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
the connection to use when executing the query
the auto-incremented keys as a List of Ints
Execute the query and get the auto-incremented key as a Long
Execute the query and get the auto-incremented key as a Long
the connection to use when executing the query
the auto-incremented key as a 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
the connection to use when executing the query
the auto-incremented keys as a a List of Longs
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
the RowParser that can parse the returned key
the connection to use when executing the query
the auto-incremented key
Execute an update
Execute an update
the db connection to use when executing the query
the number of rows update by the query
Provides direct access to the underlying java.sql.ResultSet.
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()
java.sql.ResultSet
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.
Returns the SQL query, before parameter substitution.
Returns the SQL query, before parameter substitution.
Sql is a trait for basic SQL queries.
It provides methods for parameter insertion and query execution.