class

Marten::DB::Management::Introspector::Base

Inherits Reference / Object

Base implementation of a database introspector.

The database introspector is used in the context of DB management in order to fetch operation regarding existing tables such as table names, index / constraint names, etc.

Constructors

new(connection : Connection::Base)
Source

Instance methods

columns_details(table_name : String) : Array(ColumnInfo)

Returns the details of the columns of a specific table.

Source
foreign_key_constraint_names(table_name : String, column_name : String) : Array(String)

Returns an array of all the foreign key constraints of a specific table and column.

Source
index_names(table_name : String, column_name : String) : Array(String)

Returns an array of all the index names for a specific table and column.

Source
model_table_names

Returns all the table names associated with models of the installed applications only.

Source
primary_key_constraint_names(table_name : String, column_name : String) : Array(String)

Returns an array of all the primary key constraints of a specific table and column.

Source
table_names

Returns all the tables names in the considered database.

Source
unique_constraint_names(table_name : String, column_name : String) : Array(String)

Returns an array of all the unique constraints for a specific table and column.

Source