public class PrepareStatement extends Object implements SerializableStatement
A PREPARE Statement that wraps another Statement in order to send it to the server and produce a QueryPlan.
| Modifier and Type | Field and Description |
|---|---|
static String |
PREPARE_PREFIX
a prefix to be used in order to prepare a query plan for a statement
|
| Modifier and Type | Method and Description |
|---|---|
static PrepareStatement |
prepare(Statement statement)
Construct a
PrepareStatement from a select-like Statement. |
static PrepareStatement |
prepare(String statement)
Construct a
PrepareStatement from a statement in String format. |
String |
toString() |
public static final String PREPARE_PREFIX
a prefix to be used in order to prepare a query plan for a statement
public static PrepareStatement prepare(Statement statement)
Construct a PrepareStatement from a select-like Statement.
Note that passing a PrepareStatement will return it directly, whereas passing a QueryPlan will result in an IllegalArgumentException.
statement - the Statement to prepare.IllegalArgumentException - when statement cannot be prepared.public static PrepareStatement prepare(String statement)
Construct a PrepareStatement from a statement in String format. Statement shouldn’t begin with “PREPARE”, but should that be the case resulting statement will not have a double prefix.
statement - the statement to prepare.NullPointerException - when statement is null.Copyright © 2014 Couchbase, Inc.