Class AbstractSQLServerDictionary

java.lang.Object
org.apache.openjpa.jdbc.sql.DBDictionary
org.apache.openjpa.jdbc.sql.AbstractSQLServerDictionary
All Implemented Interfaces:
JoinSyntaxes, Configurable, IdentifierConfiguration, ConnectionDecorator, LoggingConnectionDecorator.SQLWarningHandler
Direct Known Subclasses:
SQLServerDictionary, SybaseDictionary

public abstract class AbstractSQLServerDictionary extends DBDictionary
Dictionary for the SQL Server databases (Sybase and MS SQL Server).
  • Constructor Details

    • AbstractSQLServerDictionary

      public AbstractSQLServerDictionary()
  • Method Details

    • getColumns

      public Column[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String colName, Connection conn) throws SQLException
      Description copied from class: DBDictionary
      Reflect on the schema to find columns matching the given table and column patterns.
      Overrides:
      getColumns in class DBDictionary
      Throws:
      SQLException
    • getFullName

      public String getFullName(Index idx)
      Description copied from class: DBDictionary
      Returns the full name of the index, including the schema (delimited by the result of DBDictionary.catalogSeparator).
      Overrides:
      getFullName in class DBDictionary
    • setNull

      public void setNull(PreparedStatement stmnt, int idx, int colType, Column col) throws SQLException
      Description copied from class: DBDictionary
      Set null as a parameter to the statement. The column type will come from Types.
      Overrides:
      setNull in class DBDictionary
      Throws:
      SQLException
    • toStringLiteral

      public String toStringLiteral(String value)
      A string literal without the N prefix is converted to the code page of the database, so a value with a character outside ASCII may arrive as a different character. Such a value is bound as a parameter instead, which the driver sends as Unicode.
      Overrides:
      toStringLiteral in class DBDictionary
    • appendSelectRange

      protected void appendSelectRange(SQLBuffer buf, long start, long end, boolean subselect)
      Description copied from class: DBDictionary
      If this dictionary can select ranges, use this method to append the range SQL.
      Overrides:
      appendSelectRange in class DBDictionary
    • substring

      public void substring(SQLBuffer buf, FilterValue str, FilterValue start, FilterValue length)
      SUBSTRING needs a length on SQL Server. Without one, the length of the string in bytes is used: it is never less than the number of characters left, also counts trailing blanks (which LEN ignores), and a start beyond the end of the string gives the empty string instead of the error a negative length would cause.
      Overrides:
      substring in class DBDictionary
      Parameters:
      buf - the SQL buffer to write the substring invocation to
      str - a query value representing the target string
      start - a query value representing the start index
      length - a query value representing the length of substring, or null for none