org.apache.cassandra.cql3.QueryProcessor.storePreparedStatement()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(71)

本文整理了Java中org.apache.cassandra.cql3.QueryProcessor.storePreparedStatement方法的一些代码示例,展示了QueryProcessor.storePreparedStatement的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryProcessor.storePreparedStatement方法的具体详情如下:
包路径:org.apache.cassandra.cql3.QueryProcessor
类名称:QueryProcessor
方法名:storePreparedStatement

QueryProcessor.storePreparedStatement介绍

暂无

代码示例

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server

public static ResultMessage.Prepared prepare(String queryString, ClientState clientState, boolean forThrift)
throws RequestValidationException
{
  ResultMessage.Prepared existing = getStoredPreparedStatement(queryString, clientState.getRawKeyspace(), forThrift);
  if (existing != null)
    return existing;
  ParsedStatement.Prepared prepared = getStatement(queryString, clientState);
  int boundTerms = prepared.statement.getBoundTerms();
  if (boundTerms > FBUtilities.MAX_UNSIGNED_SHORT)
    throw new InvalidRequestException(String.format("Too many markers(?). %d markers exceed the allowed maximum of %d", boundTerms, FBUtilities.MAX_UNSIGNED_SHORT));
  assert boundTerms == prepared.boundNames.size();
  return storePreparedStatement(queryString, clientState.getRawKeyspace(), prepared, forThrift);
}

代码示例来源:origin: com.strapdata.cassandra/cassandra-all

public static ResultMessage.Prepared prepare(String queryString, ClientState clientState, boolean forThrift)
{
  ResultMessage.Prepared existing = getStoredPreparedStatement(queryString, clientState.getRawKeyspace(), forThrift);
  if (existing != null)
    return existing;
  ParsedStatement.Prepared prepared = getStatement(queryString, clientState);
  prepared.rawCQLStatement = queryString;
  int boundTerms = prepared.statement.getBoundTerms();
  if (boundTerms > FBUtilities.MAX_UNSIGNED_SHORT)
    throw new InvalidRequestException(String.format("Too many markers(?). %d markers exceed the allowed maximum of %d", boundTerms, FBUtilities.MAX_UNSIGNED_SHORT));
  assert boundTerms == prepared.boundNames.size();
  return storePreparedStatement(queryString, clientState.getRawKeyspace(), prepared, forThrift);
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

public static ResultMessage.Prepared prepare(String queryString, ClientState clientState, boolean forThrift)
{
  ResultMessage.Prepared existing = getStoredPreparedStatement(queryString, clientState.getRawKeyspace(), forThrift);
  if (existing != null)
    return existing;
  ParsedStatement.Prepared prepared = getStatement(queryString, clientState);
  prepared.rawCQLStatement = queryString;
  int boundTerms = prepared.statement.getBoundTerms();
  if (boundTerms > FBUtilities.MAX_UNSIGNED_SHORT)
    throw new InvalidRequestException(String.format("Too many markers(?). %d markers exceed the allowed maximum of %d", boundTerms, FBUtilities.MAX_UNSIGNED_SHORT));
  assert boundTerms == prepared.boundNames.size();
  return storePreparedStatement(queryString, clientState.getRawKeyspace(), prepared, forThrift);
}

代码示例来源:origin: jsevellec/cassandra-unit

public static ResultMessage.Prepared prepare(String queryString, ClientState clientState, boolean forThrift)
{
  ResultMessage.Prepared existing = getStoredPreparedStatement(queryString, clientState.getRawKeyspace(), forThrift);
  if (existing != null)
    return existing;
  ParsedStatement.Prepared prepared = getStatement(queryString, clientState);
  prepared.rawCQLStatement = queryString;
  int boundTerms = prepared.statement.getBoundTerms();
  if (boundTerms > FBUtilities.MAX_UNSIGNED_SHORT)
    throw new InvalidRequestException(String.format("Too many markers(?). %d markers exceed the allowed maximum of %d", boundTerms, FBUtilities.MAX_UNSIGNED_SHORT));
  assert boundTerms == prepared.boundNames.size();
  return storePreparedStatement(queryString, clientState.getRawKeyspace(), prepared, forThrift);
}

相关文章

微信公众号

最新文章

更多