class Table
- Table
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
pocketlib/dbschema.crpocketlib/execute/tabledelete.cr
pocketlib/execute/tableinsert.cr
pocketlib/execute/tableupdate.cr
Constructors
Instance Method Summary
- #count_relatives_refs_into : Hash(PkValue, Int32)
- #count_relatives_refs_into=(count_relatives_refs_into : Hash(PkValue, Int32))
-
#delete_rows(row_ids : Array(RowId)) : Tuple(Nil | Table, String)
-
#do_cascade_delete_childs(from_table_name : String, pk_value : PkValue) : Tuple(Nil | Table, String)
-
#find_id_for_a_row(arow : OuterRow)
-
#get_a_pk_iter
-
#get_an_OuterRow_template
- #index_own_pk : Array(Int32)
- #index_own_pk=(index_own_pk : Array(Int32))
-
#insert_rows(in_colnames_array : Array(String), rows : Array(Array(String))) : Tuple(Nil | Table, String)
========================================
- #kind : TableType | Nil
- #kind=(kind : TableType | Nil)
- #name : String
- #name=(name : String)
- #pk_child_tables : Array(Table)
- #pk_child_tables=(pk_child_tables : Array(Table))
- #pk_child_tables_names : Array(String)
- #pk_child_tables_names=(pk_child_tables_names : Array(String))
-
#qr_delete_rows(rows : Array(OuterRow))
-
#qr_update_row(id_row_to_delete, row : OuterRow, colname : String, new_value)
- #relatives_childs_tables : Array(ToRealtiveChildObject)
- #relatives_childs_tables=(relatives_childs_tables : Array(ToRealtiveChildObject))
- #relatives_childs_tables_names : Array(ToRealtiveChild)
- #relatives_childs_tables_names=(relatives_childs_tables_names : Array(ToRealtiveChild))
-
#save_to_dir(dirpath : String)
- #the_col_index_pk : Array(Int32)
- #the_col_index_pk=(the_col_index_pk : Array(Int32))
-
#the_column_attributes : Array(ColumnAttribute)
Ordinary columns
-
#the_column_attributes=(the_column_attributes : Array(ColumnAttribute))
Ordinary columns
- #the_columns : Array(ColName)
- #the_columns=(the_columns : Array(ColName))
- #the_lastused_rowid : RowId
- #the_lastused_rowid=(the_lastused_rowid : RowId)
-
#the_parents : Array(ToParent)
Here is one entry for each fk in the pk
-
#the_parents=(the_parents : Array(ToParent))
Here is one entry for each fk in the pk
- #the_pk_col_names : Array(ColName)
- #the_pk_col_names=(the_pk_col_names : Array(ColName))
- #the_pks : Hash(PkValue, RowId)
- #the_pks=(the_pks : Hash(PkValue, RowId))
-
#the_related_columns : Array(ToRelated)
Columns which are related to other table
-
#the_related_columns=(the_related_columns : Array(ToRelated))
Columns which are related to other table
- #the_rows : Hash(RowId, Array(ColValue))
- #the_rows=(the_rows : Hash(RowId, Array(ColValue)))
-
#to_s(io : IO)
-
#update_attributes(row_number : RowId, col_names : Array(String), new_values : Array(String)) : Tuple(Nil | Table, String)
-
#update_client_pk(from_table_name : String, old_parent_pk : PkValue, new_parent_pk : PkValue) : Tuple(Nil | Table, String)
- #update_pk_row(row_number : RowId, col_names : Array(ColName), new_values : Array(ColValue)) : Tuple(Nil | Table, String)
Constructor Detail
Instance Method Detail
- Public entry is 'delete_rows'
- Update (delete) all indexes to parent keys
- Then inovoke 'private_delete_one_new' which will do deep cascade delete of all cilds
def do_cascade_delete_childs(from_table_name : String, pk_value : PkValue) : Tuple(Nil | Table, String)
#
def insert_rows(in_colnames_array : Array(String), rows : Array(Array(String))) : Tuple(Nil | Table, String)
#
========================================
def relatives_childs_tables=(relatives_childs_tables : Array(ToRealtiveChildObject))
#
def relatives_childs_tables_names=(relatives_childs_tables_names : Array(ToRealtiveChild))
#
Here is one entry for each fk in the pk
def update_attributes(row_number : RowId, col_names : Array(String), new_values : Array(String)) : Tuple(Nil | Table, String)
#