本文整理了Java中org.h2.command.dml.Query.getParameters
方法的一些代码示例,展示了Query.getParameters
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getParameters
方法的具体详情如下:
包路径:org.h2.command.dml.Query
类名称:Query
方法名:getParameters
暂无
代码示例来源:origin: com.h2database/h2
public final Value[] getParameterValues() {
ArrayList<Parameter> list = getParameters();
if (list == null) {
list = New.arrayList();
}
int size = list.size();
Value[] params = new Value[size];
for (int i = 0; i < size; i++) {
Value v = list.get(i).getParamValue();
params[i] = v;
}
return params;
}
代码示例来源:origin: com.h2database/h2
/**
* Get the index of the first parameter.
*
* @param additionalParameters additional parameters
* @return the index of the first parameter
*/
public int getParameterOffset(ArrayList<Parameter> additionalParameters) {
int result = topQuery == null ? -1 : getMaxParameterIndex(topQuery.getParameters());
if (additionalParameters != null) {
result = Math.max(result, getMaxParameterIndex(additionalParameters));
}
return result + 1;
}
代码示例来源:origin: com.h2database/h2
/**
* Create a temporary view out of the given query.
*
* @param session the session
* @param owner the owner of the query
* @param name the view name
* @param query the query
* @param topQuery the top level query
* @return the view table
*/
public static TableView createTempView(Session session, User owner,
String name, Query query, Query topQuery) {
Schema mainSchema = session.getDatabase().getSchema(Constants.SCHEMA_MAIN);
String querySQL = query.getPlanSQL();
TableView v = new TableView(mainSchema, 0, name,
querySQL, query.getParameters(), null /* column templates */, session,
false/* allow recursive */, true /* literals have already been checked when parsing original query */,
false /* is table expression */, false/* is persistent*/);
if (v.createException != null) {
throw v.createException;
}
v.setTopQuery(topQuery);
v.setOwner(owner);
v.setTemporary(true);
return v;
}
代码示例来源:origin: com.h2database/h2
ArrayList<Parameter> paramList = query.getParameters();
if (originalParameters != null) {
for (Parameter orig : originalParameters) {
代码示例来源:origin: com.h2database/h2
querySQL = selectSQL;
} else {
ArrayList<Parameter> params = select.getParameters();
if (params != null && !params.isEmpty()) {
throw DbException.getUnsupportedException("parameters in views");
代码示例来源:origin: com.eventsourcing/h2
public final Value[] getParameterValues() {
ArrayList<Parameter> list = getParameters();
if (list == null) {
list = New.arrayList();
}
int size = list.size();
Value[] params = new Value[size];
for (int i = 0; i < size; i++) {
Value v = list.get(i).getParamValue();
params[i] = v;
}
return params;
}
代码示例来源:origin: org.wowtools/h2
public final Value[] getParameterValues() {
ArrayList<Parameter> list = getParameters();
if (list == null) {
list = New.arrayList();
}
int size = list.size();
Value[] params = new Value[size];
for (int i = 0; i < size; i++) {
Value v = list.get(i).getParamValue();
params[i] = v;
}
return params;
}
代码示例来源:origin: com.eventsourcing/h2
/**
* Get the index of the first parameter.
*
* @param additionalParameters additional parameters
* @return the index of the first parameter
*/
public int getParameterOffset(ArrayList<Parameter> additionalParameters) {
int result = topQuery == null ? -1 : getMaxParameterIndex(topQuery.getParameters());
if (additionalParameters != null) {
result = Math.max(result, getMaxParameterIndex(additionalParameters));
}
return result + 1;
}
代码示例来源:origin: org.wowtools/h2
/**
* Get the index of the first parameter.
*
* @param additionalParameters additional parameters
* @return the index of the first parameter
*/
public int getParameterOffset(ArrayList<Parameter> additionalParameters) {
int result = topQuery == null ? -1 : getMaxParameterIndex(topQuery.getParameters());
if (additionalParameters != null) {
result = Math.max(result, getMaxParameterIndex(additionalParameters));
}
return result + 1;
}
代码示例来源:origin: com.h2database/com.springsource.org.h2
public final Value[] getParameterValues() throws SQLException {
ObjectArray list = getParameters();
if (list == null) {
list = new ObjectArray();
}
Value[] params = new Value[list.size()];
for (int i = 0; i < list.size(); i++) {
Value v = ((Parameter) list.get(i)).getParamValue();
params[i] = v;
}
return params;
}
代码示例来源:origin: com.h2database/com.springsource.org.h2
public static TableView createTempView(Session s, User owner, Query query) throws SQLException {
String tempViewName = s.getNextTempViewName();
Schema mainSchema = s.getDatabase().getSchema(Constants.SCHEMA_MAIN);
String querySQL = query.getPlanSQL();
TableView v = new TableView(mainSchema, 0, tempViewName, querySQL, query.getParameters(), null, s,
false);
if (v.createException != null) {
throw v.createException;
}
v.setOwner(owner);
v.setTemporary(true);
return v;
}
代码示例来源:origin: org.wowtools/h2
/**
* Create a temporary view out of the given query.
*
* @param session the session
* @param owner the owner of the query
* @param name the view name
* @param query the query
* @param topQuery the top level query
* @return the view table
*/
public static TableView createTempView(Session session, User owner,
String name, Query query, Query topQuery) {
Schema mainSchema = session.getDatabase().getSchema(Constants.SCHEMA_MAIN);
String querySQL = query.getPlanSQL();
TableView v = new TableView(mainSchema, 0, name,
querySQL, query.getParameters(), null, session,
false);
if (v.createException != null) {
throw v.createException;
}
v.setTopQuery(topQuery);
v.setOwner(owner);
v.setTemporary(true);
return v;
}
代码示例来源:origin: com.eventsourcing/h2
/**
* Create a temporary view out of the given query.
*
* @param session the session
* @param owner the owner of the query
* @param name the view name
* @param query the query
* @param topQuery the top level query
* @return the view table
*/
public static TableView createTempView(Session session, User owner,
String name, Query query, Query topQuery) {
Schema mainSchema = session.getDatabase().getSchema(Constants.SCHEMA_MAIN);
String querySQL = query.getPlanSQL();
TableView v = new TableView(mainSchema, 0, name,
querySQL, query.getParameters(), null, session,
false);
if (v.createException != null) {
throw v.createException;
}
v.setTopQuery(topQuery);
v.setOwner(owner);
v.setTemporary(true);
return v;
}
代码示例来源:origin: org.wowtools/h2
ArrayList<Parameter> paramList = query.getParameters();
if (originalParameters != null) {
for (int i = 0, size = originalParameters.size(); i < size; i++) {
代码示例来源:origin: com.eventsourcing/h2
ArrayList<Parameter> paramList = query.getParameters();
if (originalParameters != null) {
for (int i = 0, size = originalParameters.size(); i < size; i++) {
代码示例来源:origin: com.h2database/com.springsource.org.h2
columns[i] = col;
int mask = masks[idx];
int nextParamIndex = query.getParameters().size();
if ((mask & IndexCondition.EQUALITY) != 0) {
Parameter param = new Parameter(nextParamIndex);
代码示例来源:origin: com.h2database/com.springsource.org.h2
public Cursor find(Session session, SearchRow first, SearchRow last) throws SQLException {
ObjectArray paramList = query.getParameters();
int idx = 0;
for (int i = 0; originalParameters != null && i < originalParameters.size(); i++) {
代码示例来源:origin: com.eventsourcing/h2
querySQL = selectSQL;
} else {
ArrayList<Parameter> params = select.getParameters();
if (params != null && params.size() > 0) {
throw DbException.getUnsupportedException("parameters in views");
代码示例来源:origin: com.h2database/com.springsource.org.h2
return query;
int firstIndexParam = query.getParameters().size();
IntArray paramIndex = new IntArray();
for (int i = 0; i < masks.length; i++) {
代码示例来源:origin: org.wowtools/h2
querySQL = selectSQL;
} else {
ArrayList<Parameter> params = select.getParameters();
if (params != null && params.size() > 0) {
throw DbException.getUnsupportedException("parameters in views");
内容来源于网络,如有侵权,请联系作者删除!