Tabnine Logo
SqlQuery.getArgs
Code IndexAdd Tabnine to your IDE (free)

How to use
getArgs
method
in
org.apache.ignite.cache.query.SqlQuery

Best Java code snippets using org.apache.ignite.cache.query.SqlQuery.getArgs (Showing top 7 results out of 315)

origin: apache/ignite

/**
 * Convert query arguments to BinaryObjects if binary marshaller used.
 *
 * @param qry Query.
 */
private void convertToBinary(final Query qry) {
  GridCacheContext<K, V> ctx = getContextSafe();
  if (ctx.binaryMarshaller()) {
    if (qry instanceof SqlQuery) {
      final SqlQuery sqlQry = (SqlQuery) qry;
      convertToBinary(sqlQry.getArgs());
    }
    else if (qry instanceof SpiQuery) {
      final SpiQuery spiQry = (SpiQuery) qry;
      convertToBinary(spiQry.getArgs());
    }
    else if (qry instanceof SqlFieldsQuery) {
      final SqlFieldsQuery fieldsQry = (SqlFieldsQuery) qry;
      convertToBinary(fieldsQry.getArgs());
    }
  }
}
origin: apache/ignite

/** Handle SQL query. */
private QueryCursor<Cache.Entry<K, V>> sqlQuery(SqlQuery qry) {
  Consumer<BinaryOutputStream> qryWriter = out -> {
    writeCacheInfo(out);
    serDes.writeObject(out, qry.getType());
    serDes.writeObject(out, qry.getSql());
    ClientUtils.collection(qry.getArgs(), out, serDes::writeObject);
    out.writeBoolean(qry.isDistributedJoins());
    out.writeBoolean(qry.isLocal());
    out.writeBoolean(qry.isReplicatedOnly());
    out.writeInt(qry.getPageSize());
    out.writeLong(qry.getTimeout());
  };
  return new ClientQueryCursor<>(new ClientQueryPager<>(
    ch,
    ClientOperation.QUERY_SQL,
    ClientOperation.QUERY_SQL_CURSOR_GET_PAGE,
    qryWriter,
    keepBinary,
    marsh
  ));
}
origin: apache/ignite

/** {@inheritDoc} */
@SuppressWarnings("deprecation")
@Override public SqlFieldsQuery generateFieldsQuery(String cacheName, SqlQuery qry) {
  String schemaName = schema(cacheName);
  String type = qry.getType();
  H2TableDescriptor tblDesc = schemaMgr.tableForType(schemaName, cacheName, type);
  if (tblDesc == null)
    throw new IgniteSQLException("Failed to find SQL table for type: " + type,
      IgniteQueryErrorCode.TABLE_NOT_FOUND);
  String sql;
  try {
    sql = H2Utils.generateFieldsQueryString(qry.getSql(), qry.getAlias(), tblDesc);
  }
  catch (IgniteCheckedException e) {
    throw new IgniteException(e);
  }
  SqlFieldsQuery res = new SqlFieldsQuery(sql);
  res.setArgs(qry.getArgs());
  res.setDistributedJoins(qry.isDistributedJoins());
  res.setLocal(qry.isLocal());
  res.setPageSize(qry.getPageSize());
  res.setPartitions(qry.getPartitions());
  res.setReplicatedOnly(qry.isReplicatedOnly());
  res.setSchema(schemaName);
  res.setSql(sql);
  res.setDataPageScanEnabled(qry.isDataPageScanEnabled());
  if (qry.getTimeout() > 0)
    res.setTimeout(qry.getTimeout(), TimeUnit.MILLISECONDS);
  return res;
}
origin: org.apache.ignite/ignite-core

/**
 * Convert query arguments to BinaryObjects if binary marshaller used.
 *
 * @param qry Query.
 */
private void convertToBinary(final Query qry) {
  if (ctx.binaryMarshaller()) {
    if (qry instanceof SqlQuery) {
      final SqlQuery sqlQry = (SqlQuery) qry;
      convertToBinary(sqlQry.getArgs());
    }
    else if (qry instanceof SpiQuery) {
      final SpiQuery spiQry = (SpiQuery) qry;
      convertToBinary(spiQry.getArgs());
    }
    else if (qry instanceof SqlFieldsQuery) {
      final SqlFieldsQuery fieldsQry = (SqlFieldsQuery) qry;
      convertToBinary(fieldsQry.getArgs());
    }
  }
}
origin: org.apache.ignite/ignite-indexing

String sqlQry = qry.getSql();
String alias = qry.getAlias();
Object[] params = qry.getArgs();
origin: org.apache.ignite/ignite-indexing

fqry.setArgs(qry.getArgs());
fqry.setPageSize(qry.getPageSize());
fqry.setDistributedJoins(qry.isDistributedJoins());
origin: org.apache.ignite/ignite-core

/** Handle SQL query. */
private QueryCursor<Cache.Entry<K, V>> sqlQuery(SqlQuery qry) {
  Consumer<BinaryOutputStream> qryWriter = out -> {
    writeCacheInfo(out);
    serDes.writeObject(out, qry.getType());
    serDes.writeObject(out, qry.getSql());
    ClientUtils.collection(qry.getArgs(), out, serDes::writeObject);
    out.writeBoolean(qry.isDistributedJoins());
    out.writeBoolean(qry.isLocal());
    out.writeBoolean(qry.isReplicatedOnly());
    out.writeInt(qry.getPageSize());
    out.writeLong(qry.getTimeout());
  };
  return new ClientQueryCursor<>(new ClientQueryPager<>(
    ch,
    ClientOperation.QUERY_SQL,
    ClientOperation.QUERY_SQL_CURSOR_GET_PAGE,
    qryWriter,
    keepBinary,
    marsh
  ));
}
org.apache.ignite.cache.querySqlQuerygetArgs

Javadoc

Gets SQL arguments.

Popular methods of SqlQuery

  • <init>
    Constructs query for the given type name and SQL query.
  • setArgs
    Sets SQL arguments.
  • getPageSize
  • getPartitions
    Gets partitions for query, in ascending order.
  • getSql
    Gets SQL clause.
  • getTimeout
    Gets the query execution timeout in milliseconds.
  • getType
    Gets type for query.
  • isDistributedJoins
    Check if distributed joins are enabled for this query.
  • isLocal
  • isReplicatedOnly
    Check is the query contains only replicated tables.
  • setDistributedJoins
    Specify if distributed joins are enabled for this query. When disabled, join results will only conta
  • setLocal
  • setDistributedJoins,
  • setLocal,
  • setPageSize,
  • setReplicatedOnly,
  • setSql,
  • getAlias,
  • isDataPageScanEnabled,
  • prepare,
  • setAlias

Popular in Java

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Notification (javax.management)
  • JTextField (javax.swing)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now