Search in sources :

Example 46 with ResultInterface

use of org.h2.result.ResultInterface in project h2database by h2database.

the class H2Database method rawQuery.

/**
 * Execute the query.
 *
 * @param sql the SQL statement
 * @param selectionArgs the parameter values
 * @return the cursor
 */
public Cursor rawQuery(String sql, String[] selectionArgs) {
    Prepared prep = prepare(sql, selectionArgs);
    ResultInterface result = prep.query(0);
    return new H2Cursor(result);
}
Also used : ResultInterface(org.h2.result.ResultInterface) Prepared(org.h2.command.Prepared)

Aggregations

ResultInterface (org.h2.result.ResultInterface)34 Value (org.h2.value.Value)15 DbException (org.h2.message.DbException)11 LocalResult (org.h2.result.LocalResult)9 SQLException (java.sql.SQLException)8 CommandInterface (org.h2.command.CommandInterface)7 Expression (org.h2.expression.Expression)5 Column (org.h2.table.Column)5 SQLClientInfoException (java.sql.SQLClientInfoException)4 Prepared (org.h2.command.Prepared)4 Database (org.h2.engine.Database)4 ResultWithGeneratedKeys (org.h2.result.ResultWithGeneratedKeys)4 Row (org.h2.result.Row)4 IOException (java.io.IOException)3 ValueString (org.h2.value.ValueString)3 Savepoint (java.sql.Savepoint)2 GeneratedKeys (org.h2.engine.GeneratedKeys)2 ExpressionColumn (org.h2.expression.ExpressionColumn)2 SequenceValue (org.h2.expression.SequenceValue)2 ResultRemote (org.h2.result.ResultRemote)2