struct Avram::Database::DatabaseInfo

Defined in:

avram/database/database_info.cr

Constant Summary

SQL_QUERY = " SELECT columns.table_name,\n tables.table_type,\n columns.table_schema,\n columns.table_catalog,\n columns.column_name,\n columns.is_nullable,\n columns.column_default,\n columns.data_type\n FROM information_schema.columns as columns\n JOIN information_schema.tables as tables\n ON tables.table_name = columns.table_name\n AND tables.table_catalog = columns.table_catalog\n AND tables.table_schema = columns.table_schema\n WHERE columns.table_schema='public';"

Constructors

Instance Method Summary

Instance methods inherited from class Object

blank_for_validates_required? : Bool blank_for_validates_required?

Constructor Detail

def self.load(database : Avram::Database.class) : DatabaseInfo #

[View source]
def self.new(table_infos : Array(Avram::Database::TableInfo)) #

[View source]

Instance Method Detail

def table(name : String) : TableInfo | Nil #

[View source]
def table?(name : String) : Bool #

[View source]
def table_infos : Array(TableInfo) #

[View source]
def table_infos=(table_infos : Array(TableInfo)) #

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

[View source]