Class QueryWithMetaData


  • public final class QueryWithMetaData
    extends Object

    A SQL query with optional metadata.

    Since:
    2017.1.3
    Author:
    Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
    • Constructor Detail

      • QueryWithMetaData

        public QueryWithMetaData​(@NotNull
                                 String query,
                                 boolean directPathInsert)

        Creates a new query with metadata.

        Parameters:
        query - the query string.
        directPathInsert - true if this is an Oracle direct-path INSERT, false if not or N/A.
    • Method Detail

      • getQuery

        @NotNull
        public String getQuery()

        Returns the query string.

        Returns:
        the query string.
      • isDirectPathInsert

        public boolean isDirectPathInsert()

        Whether this query is a direct-path INSERT (only applies to INSERT statements in Oracle). For other database types, this property is always false.

        Direct-path INSERT's are enabled with the /*+ APPEND */ or /*+ APPEND_VALUES */ SQL hints.

        In the EXPLAIN PLAN FOR ... output, direct-path INSERT's appear as LOAD AS SELECT or DIRECT LOAD INTO, as opposed to LOAD TABLE CONVENTIONAL or INTO for conventional INSERT's.

        Returns:
        true if this is a direct-path INSERT, false otherwise.
        See Also:
        OracleUtilities.isDirectPathInsertEnabled(), Direct-Load INSERT