Interface OCommandRequest

All Known Subinterfaces:
OCommandRequestInternal, OCommandRequestText, OQuery<T>
All Known Implementing Classes:
OCommandFunction, OCommandGremlin, OCommandRequestAbstract, OCommandRequestTextAbstract, OCommandScript, OCommandSQL, OCommandSQLPojoWrapper, OCommandSQLResultset, OLiveQuery, OQueryAbstract, OrientGraphCommand, OSQLAsynchQuery, OSQLNonBlockingQuery, OSQLQuery, OSQLSynchQuery

public interface OCommandRequest
Generic GOF command pattern implementation. Execute a command passing the optional arguments "iArgs" and returns an Object.
Author:
Luca Garulli (l.garulli--(at)--orientdb.com)
  • Method Details

    • execute

      <RET> RET execute(Object... iArgs)
    • getLimit

      int getLimit()
      This api is deprecated use sql keyword "LIMIT" instead

      Returns the limit of result set. -1 means no limits.

    • setLimit

      @Deprecated OCommandRequest setLimit(int iLimit)
      Deprecated.
      This api is deprecated use sql keyword "LIMIT" instead

      Sets the maximum items the command can returns. -1 means no limits.

      Parameters:
      iLimit - -1 = no limit. 1 to N to limit the result set.
      Returns:
    • getTimeoutTime

      @Deprecated long getTimeoutTime()
      Deprecated.
      This api is deprecated use sql keyword "TIMEOUT" instead

      Returns the command timeout. 0 means no timeout.

      Returns:
    • getTimeoutStrategy

      Deprecated.
      This api is deprecated use sql keyword "TIMEOUT" instead

      Returns the command timeout strategy between the defined ones.

      Returns:
    • setTimeout

      @Deprecated void setTimeout(long timeout, OCommandContext.TIMEOUT_STRATEGY strategy)
      Deprecated.
      This api is deprecated use sql keyword "TIMEOUT" instead

      Sets the command timeout. When the command execution time is major than the timeout the command returns

      Parameters:
      timeout -
    • isIdempotent

      boolean isIdempotent()
      Returns true if the command doesn't change the database, otherwise false.
    • getFetchPlan

      @Deprecated String getFetchPlan()
      Deprecated.
      This api is deprecated use sql keyword "FETCHPLAN" instead

      Returns the fetch plan if any

      Returns:
      Fetch plan as unique string or null if it was not defined.
    • setFetchPlan

      @Deprecated <RET extends OCommandRequest> RET setFetchPlan(String iFetchPlan)
      Deprecated.
      This api is deprecated use sql keyword "FETCHPLAN" instead

      Set the fetch plan. The format is:

       <field>:<depth-level>*
       
      Where:
      • field is the name of the field to specify the depth-level. * wildcard means any fields
      • depth-level is the depth level to fetch. -1 means infinite, 0 means no fetch at all and 1-N the depth level value.
      Uses the blank spaces to separate the fields strategies.
      Example:
       children:-1 parent:0 sibling:3 *:0
       

      Parameters:
      iFetchPlan -
      Returns:
    • setUseCache

      void setUseCache(boolean iUseCache)
    • getContext

      OCommandContext getContext()
    • setContext

      OCommandRequest setContext(OCommandContext iContext)