abstract class Marten::DB::Management::Introspector::Base

Overview

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.

Direct Known Subclasses

Defined in:

marten/db/management/introspector/base.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(connection : Connection::Base) #

[View source]

Instance Method Detail

abstract def columns_details(table_name : String) : Array(ColumnInfo) #

Returns the details of the columns of a specific table.


[View source]
abstract def 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.


[View source]
abstract def index_names(table_name : String, column_name : String) : Array(String) #

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


[View source]
def model_table_names : Array(String) #

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


[View source]
abstract def 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.


[View source]
abstract def table_names : Array(String) #

Returns all the tables names in the considered database.


[View source]
abstract def 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.


[View source]