Class PostgreSQLNameIndex

    • Field Detail

      • generatedKeySelectSQL

        protected String generatedKeySelectSQL
    • Method Detail

      • init

        protected void init​(String schemaObjectPrefix)
                     throws SQLException
        Inits this index and prepares the statements.
        Overrides:
        init in class DbNameIndex
        Parameters:
        schemaObjectPrefix - the prefix for table names
        Throws:
        SQLException - if the statements cannot be prepared.
      • insertString

        protected int insertString​(String string)
        Inserts a string into the database and returns the new index.

        Instead of using the Statement.RETURN_GENERATED_KEYS feature, the newly inserted index is retrieved by a 2nd select statement.

        Overrides:
        insertString in class DbNameIndex
        Parameters:
        string - the string to insert
        Returns:
        the new index.
      • getGeneratedKey

        protected int getGeneratedKey()
        Retrieves the last assigned key from the database.
        Returns:
        the index.