Class SchemaExaminer

java.lang.Object
com.valqueries.automapper.context.schema.SchemaExaminer
All Implemented Interfaces:
ISchemaExaminer

public class SchemaExaminer extends Object implements ISchemaExaminer
  • Constructor Details

    • SchemaExaminer

      public SchemaExaminer(Database database)
  • Method Details

    • columnExists

      @CheckReturnValue public boolean columnExists(String schema, Token table, Token column)
      Description copied from interface: ISchemaExaminer
      Check if a column exists in a specified schema and table.
      Specified by:
      columnExists in interface ISchemaExaminer
      Parameters:
      schema - the schema to check in
      table - the table to be checked
      column - the column to be checked
      Returns:
      true if the table exists, false otherwise
    • tableExists

      @CheckReturnValue public boolean tableExists(String schema, Token table)
      Description copied from interface: ISchemaExaminer
      Check if a table exists in a specified schema.
      Specified by:
      tableExists in interface ISchemaExaminer
      Parameters:
      schema - the schema to check in
      table - the table to be checked.
      Returns:
      true if the table exists, false otherwise
    • schemaExists

      @CheckReturnValue public boolean schemaExists(String schema)
      Description copied from interface: ISchemaExaminer
      Check if a schema exists.
      Specified by:
      schemaExists in interface ISchemaExaminer
      Parameters:
      schema - the schema to check
      Returns:
      true if the schema exists, false otherwise
    • hasPrimaryKey

      public boolean hasPrimaryKey(String schema, Token table)
      Description copied from interface: ISchemaExaminer
      Check if a primary key exists for a table in a schema.
      Specified by:
      hasPrimaryKey in interface ISchemaExaminer
      Parameters:
      schema - the schema to check in
      table - the table to be checked
      Returns:
      true if the table has a primary key, false otherwise