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

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

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

origin: apache/ignite

  /** {@inheritDoc} */
  @Override public ClientResponse process(ClientConnectionContext ctx) {
    IgniteCache cache = cache(ctx);

    ctx.incrementCursors();

    try {
      QueryCursor cur = cache.query(qry);

      ClientCacheEntryQueryCursor cliCur = new ClientCacheEntryQueryCursor(
          cur, qry.getPageSize(), ctx);

      long cursorId = ctx.resources().put(cliCur);

      cliCur.id(cursorId);

      return new ClientCacheQueryResponse(requestId(), cliCur);
    }
    catch (Exception e) {
      ctx.decrementCursors();

      throw e;
    }
  }
}
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

  /** {@inheritDoc} */
  @Override public ClientResponse process(ClientConnectionContext ctx) {
    IgniteCache cache = cache(ctx);

    ctx.incrementCursors();

    try {
      QueryCursor cur = cache.query(qry);

      ClientCacheEntryQueryCursor cliCur = new ClientCacheEntryQueryCursor(
          cur, qry.getPageSize(), ctx);

      long cursorId = ctx.resources().put(cliCur);

      cliCur.id(cursorId);

      return new ClientCacheQueryResponse(requestId(), cliCur);
    }
    catch (Exception e) {
      ctx.decrementCursors();

      throw e;
    }
  }
}
origin: org.apache.ignite/ignite-indexing

fqry.setPageSize(qry.getPageSize());
fqry.setDistributedJoins(qry.isDistributedJoins());
fqry.setPartitions(qry.getPartitions());
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.querySqlQuerygetPageSize

Popular methods of SqlQuery

  • <init>
    Constructs query for the given type name and SQL query.
  • setArgs
    Sets SQL arguments.
  • getArgs
    Gets SQL arguments.
  • 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

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • Menu (java.awt)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Table (org.hibernate.mapping)
    A relational table
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • CodeWhisperer alternatives
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