Class JDBCStoreQuery

    • Constructor Detail

    • Method Detail

      • getStore

        public JDBCStore getStore()
        Return the store.
      • executeDelete

        protected java.lang.Number executeDelete​(StoreQuery.Executor ex,
                                                 ClassMetaData base,
                                                 ClassMetaData[] metas,
                                                 boolean subclasses,
                                                 ExpressionFactory[] facts,
                                                 QueryExpressions[] exps,
                                                 java.lang.Object[] params)
        Description copied from class: ExpressionStoreQuery
        Execute the given expression against the given candidate extent and delete the instances.
        Overrides:
        executeDelete in class ExpressionStoreQuery
        Parameters:
        ex - current executor
        base - the base type the query should match
        metas - the independent candidate types
        subclasses - true if subclasses should be included in the results
        facts - the expression factory used to build the query for each base type
        exps - the parsed query values
        params - parameter values, or empty array
        Returns:
        a number indicating the number of instances deleted, or null to execute the delete in memory
      • executeUpdate

        protected java.lang.Number executeUpdate​(StoreQuery.Executor ex,
                                                 ClassMetaData base,
                                                 ClassMetaData[] metas,
                                                 boolean subclasses,
                                                 ExpressionFactory[] facts,
                                                 QueryExpressions[] exps,
                                                 java.lang.Object[] params)
        Description copied from class: ExpressionStoreQuery
        Execute the given expression against the given candidate extent and updates the instances.
        Overrides:
        executeUpdate in class ExpressionStoreQuery
        Parameters:
        ex - current executor
        base - the base type the query should match
        metas - the independent candidate types
        subclasses - true if subclasses should be included in the results
        facts - the expression factory used to build the query for each base type
        exps - the parsed query values
        params - parameter values, or empty array
        Returns:
        a number indicating the number of instances updated, or null to execute the update in memory.
      • getDataStoreActions

        protected java.lang.String[] getDataStoreActions​(ClassMetaData base,
                                                         ClassMetaData[] metas,
                                                         boolean subclasses,
                                                         ExpressionFactory[] facts,
                                                         QueryExpressions[] exps,
                                                         java.lang.Object[] params,
                                                         StoreQuery.Range range)
        Description copied from class: ExpressionStoreQuery
        Return the commands that will be sent to the datastore in order to execute the query, typically in the database's native language.
        Overrides:
        getDataStoreActions in class ExpressionStoreQuery
        Parameters:
        base - the base type the query should match
        metas - the independent candidate types
        subclasses - true if subclasses should be included in the results
        facts - the expression factory used to build the query for each base type
        exps - the parsed query values
        params - parameter values, or empty array
        range - result range
        Returns:
        a textual description of the query to execute
      • executeUpdate

        protected int executeUpdate​(java.sql.Connection conn,
                                    java.sql.PreparedStatement stmnt,
                                    SQLBuffer sqlBuf,
                                    boolean isUpdate)
                             throws java.sql.SQLException
        This method is to provide override for non-JDBC or JDBC-like implementation of executing update.
        Throws:
        java.sql.SQLException
      • prepareStatement

        protected java.sql.PreparedStatement prepareStatement​(java.sql.Connection conn,
                                                              SQLBuffer sql)
                                                       throws java.sql.SQLException
        This method is to provide override for non-JDBC or JDBC-like implementation of preparing statement.
        Throws:
        java.sql.SQLException
      • getThreadLocalContext

        public static Context[] getThreadLocalContext()
      • getThreadLocalContext

        public static Context getThreadLocalContext​(Context orig)
      • getThreadLocalSelect

        public static Select getThreadLocalSelect​(Select select)
      • getThreadLocalContext

        public static Context getThreadLocalContext​(Context lctx,
                                                    Context cloneFrom)