class Table

Included Modules

Defined in:

pocketlib/dbschema.cr
pocketlib/execute/tabledelete.cr
pocketlib/execute/tableinsert.cr
pocketlib/execute/tableupdate.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new #


[View source]

Instance Method Detail

def count_relatives_refs_into : Hash(PkValue, Int32) #

[View source]
def count_relatives_refs_into=(count_relatives_refs_into : Hash(PkValue, Int32)) #

[View source]
def delete_rows(row_ids : Array(RowId)) : Tuple(Nil | Table, String) #
  1. Public entry is 'delete_rows'
  2. Update (delete) all indexes to parent keys
  3. Then inovoke 'private_delete_one_new' which will do deep cascade delete of all cilds

[View source]
def do_cascade_delete_childs(from_table_name : String, pk_value : PkValue) : Tuple(Nil | Table, String) #


[View source]
def find_id_for_a_row(arow : OuterRow) #


[View source]
def get_a_pk_iter #


[View source]
def get_an_OuterRow_template #


[View source]
def index_own_pk : Array(Int32) #

[View source]
def index_own_pk=(index_own_pk : Array(Int32)) #

[View source]
def insert_rows(in_colnames_array : Array(String), rows : Array(Array(String))) : Tuple(Nil | Table, String) #

========================================


[View source]
def kind : TableType | Nil #

[View source]
def kind=(kind : TableType | Nil) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def pk_child_tables : Array(Table) #

[View source]
def pk_child_tables=(pk_child_tables : Array(Table)) #

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

[View source]
def pk_child_tables_names=(pk_child_tables_names : Array(String)) #

[View source]
def qr_delete_rows(rows : Array(OuterRow)) #


[View source]
def qr_update_row(id_row_to_delete, row : OuterRow, colname : String, new_value) #


[View source]
def relatives_childs_tables : Array(ToRealtiveChildObject) #

[View source]
def relatives_childs_tables=(relatives_childs_tables : Array(ToRealtiveChildObject)) #

[View source]
def relatives_childs_tables_names : Array(ToRealtiveChild) #

[View source]
def relatives_childs_tables_names=(relatives_childs_tables_names : Array(ToRealtiveChild)) #

[View source]
def save_to_dir(dirpath : String) #


[View source]
def the_col_index_pk : Array(Int32) #

[View source]
def the_col_index_pk=(the_col_index_pk : Array(Int32)) #

[View source]
def the_column_attributes : Array(ColumnAttribute) #

Ordinary columns


[View source]
def the_column_attributes=(the_column_attributes : Array(ColumnAttribute)) #

Ordinary columns


[View source]
def the_columns : Array(ColName) #

[View source]
def the_columns=(the_columns : Array(ColName)) #

[View source]
def the_lastused_rowid : RowId #

[View source]
def the_lastused_rowid=(the_lastused_rowid : RowId) #

[View source]
def the_parents : Array(ToParent) #

Here is one entry for each fk in the pk


[View source]
def the_parents=(the_parents : Array(ToParent)) #

Here is one entry for each fk in the pk


[View source]
def the_pk_col_names : Array(ColName) #

[View source]
def the_pk_col_names=(the_pk_col_names : Array(ColName)) #

[View source]
def the_pks : Hash(PkValue, RowId) #

[View source]
def the_pks=(the_pks : Hash(PkValue, RowId)) #

[View source]
def the_related_columns : Array(ToRelated) #

Columns which are related to other table


[View source]
def the_related_columns=(the_related_columns : Array(ToRelated)) #

Columns which are related to other table


[View source]
def the_rows : Hash(RowId, Array(ColValue)) #

[View source]
def the_rows=(the_rows : Hash(RowId, Array(ColValue))) #

[View source]
def to_s(io : IO) #


[View source]
def update_attributes(row_number : RowId, col_names : Array(String), new_values : Array(String)) : Tuple(Nil | Table, String) #




[View source]
def update_client_pk(from_table_name : String, old_parent_pk : PkValue, new_parent_pk : PkValue) : Tuple(Nil | Table, String) #


[View source]
def update_pk_row(row_number : RowId, col_names : Array(ColName), new_values : Array(ColValue)) : Tuple(Nil | Table, String) #

[View source]