|
Public Types |
enum | enum_tablemodes {
mode_normal,
mode_createtable,
mode_altertable,
mode_disabled,
mode_insertrow,
mode_deleterow,
mode_unknown
} |
enum | enum_accessmode { standard,
batchread,
batchwrite
} |
enum | enum_dependingmodes {
depending_nohandle,
depending_standard,
depending_change,
depending_delete,
depending_changedelete
} |
Public Member Functions |
virtual | ~hk_datasource () |
virtual void | set_name (const hk_string &n, bool registerchange=true) |
virtual hk_string | name (void) |
enum_tablemodes | mode (void) |
void | setmode_insertrow (void) |
void | delete_actualrow (enum_interaction c=interactive) |
void | setmode_normal (void) |
void | setmode_createtable (void) |
void | setmode_altertable (void) |
hk_column * | new_column (void) |
bool | alter_column (const hk_string &col, const hk_string *name=NULL, hk_column::enum_columntype *newtype=NULL, long *size=NULL, const hk_string *defaultvalue=NULL, const bool *primary=NULL, const bool *notnull=NULL) |
bool | delete_column (const hk_string &col) |
bool | create_table_now (void) |
bool | alter_table_now (void) |
bool | create_view_now (void) |
bool | alter_view_now (void) |
virtual bool | goto_row (unsigned long r) |
bool | while_goto_row (void) const |
bool | goto_first (void) |
bool | goto_last (void) |
bool | goto_next (void) |
bool | goto_previous (void) |
bool | goto_random (void) |
unsigned long | row_position (void) |
unsigned long | max_rows (void) |
bool | set_accessmode (enum_accessmode) |
enum_accessmode | accessmode (void) const |
bool | enable (void) |
bool | while_enabling (void) const |
bool | disable (void) |
bool | while_disabling (void) const |
bool | set_enabled (bool e) |
bool | is_enabled (void) const |
bool | is_readonly (void) const |
void | set_readonly (bool r) |
list< hk_column * > * | columns (void) |
list< hk_string > * | columnnames (void) |
hk_column * | column_by_name (const hk_string &c) |
hk_column * | column_by_name (const hk_string &c, int colnumber) |
int | columnname_occurances (const hk_string &colname) |
int | columnname_occurance (hk_column *) |
bool | set_sql (const hk_string &s, bool rawsql=false, bool registerchange=true) |
virtual bool | set_query (hk_qbe *, bool registerchange=true) |
hk_string | sql (void) const |
bool | is_rawsql (void) |
hk_string | backendsql (void) const |
list< indexclass > * | indices (void) |
bool | index_exists (const hk_string &) |
bool | drop_index (const hk_string &i) |
bool | create_index (const hk_string &name, bool unique, list< hk_string > &fields) |
bool | alter_index (const hk_string &name, bool unique, list< hk_string > &fields) |
enum_dependingmodes | dependingmode (void) |
bool | set_depending_on (hk_datasource *d, bool react_on_data_changes=false, enum_dependingmodes mode=depending_standard) |
hk_datasource * | depending_on (void) |
bool | depending_on_react_on_data_changes (void) |
list< hk_string > * | depending_on_thisfields (void) |
list< hk_string > * | depending_on_masterfields (void) |
bool | set_depending_on_presentationdatasource (long d, bool react_on_data_changes=false, enum_dependingmodes mode=depending_standard, bool registerchange=true) |
long | depending_on_presentationdatasource (void) |
void | add_depending_fields (const hk_string &this_ds_field, const hk_string &master_ds_field, bool registerchange=true) |
void | clear_depending_fields (bool registerchange=true) |
bool | store_changed_data (enum_interaction c=interactive) |
void | set_ignore_changed_data (void) |
bool | ignore_changed_data (void) const |
void | set_filter (const hk_string &f, bool registerchange=true) |
hk_string | filter (void) |
void | set_temporaryfilter (const hk_string &f) |
hk_string | temporaryfilter (void) |
void | set_use_temporaryfilter (bool use) |
bool | use_temporaryfilter (void) |
void | set_internalfilter (const hk_string &f) |
hk_string | internalfilter (void) |
void | set_use_internalfilter (bool use) |
bool | use_internalfilter (void) |
void | clear_filter (bool registerchange=true) |
void | set_sorting (const hk_string &s, bool registerchange=true) |
hk_string | sorting (void) |
void | set_temporarysorting (const hk_string &s) |
hk_string | temporarysorting (void) |
void | set_use_temporarysorting (bool use) |
bool | use_temporarysorting (void) |
void | clear_sorting (bool registerchange=true) |
void | set_automatic_data_update (bool u) |
bool | is_automatic_data_update (void) |
void | set_sqldelimiter (const hk_string &) |
void | set_datetimeformat (const hk_string &datetime, const hk_string &date, const hk_string &time) |
hk_database * | database (void) |
void | savedata (ostream &s, bool saveall=true) |
void | loaddata (const hk_string &definition, bool loadsql=true) |
long | presentationnumber (void) const |
bool | datasource_used (void) const |
virtual void | dump_data () |
bool | ask_name (void) |
bool | delete_rows (unsigned long from, unsigned long to, bool check_depending_datasources=true, bool ask=true) |
void | transaction_begin (hk_string name="") |
void | transaction_commit (hk_string name="") |
void | transaction_rollback (hk_string name="") |
void | set_blockvisiblesignals (bool v) |
bool | blockvisiblesignals (void) |
void | set_blockserversignals (bool) |
bool | blockserversignals (void) |
void | set_blockdatasourcesignals (bool) |
bool | blockdatasourcesignals (void) |
void | save_datasourcedefinition (ostream &s) |
bool | load_datasourcedefinition (const hk_string &definition, bool use_xmltablename=true, bool ask=true) |
hk_presentation * | presentation (void) |
void | set_position (int x, int y, bool registerchange=true) |
void | set_size (int width, int height, bool registerchange=true) |
int | x (void) const |
int | y (void) const |
int | width (void) const |
int | height (void) const |
void | set_designsize (int w, int h, bool registerchange=true) |
int | designwidth () const |
int | designheight () const |
void | automatic_position_datasource (void) |
list< hk_datasource * > * | dependinglist (void) |
bool | previous_enable_problems (void) const |
list< referentialclass > * | referenceslist (void) |
bool | add_reference (const referentialclass &) |
bool | drop_reference (const hk_string &) |
hk_string | fieldorigin (const hk_string &) |
hk_string | totalfieldorigin (const hk_string &) |
void | reset_changed_data (void) |
bool | has_changed (void) const |
hk_string | systemcolumnname (const hk_string &n) |
bool | depending_on_datasource_deleterow_ok (void) |
bool | depending_on_datasource_before_delete_row (void) |
bool | depending_on_datasource_updaterow_ok (void) |
bool | check_store_changed_data () |
Static Public Member Functions |
static void | set_enablefunction (voidfunction *, long counter) |
Protected Member Functions |
| hk_datasource (hk_database *db, hk_presentation *p=NULL) |
void | column_remove (hk_column *col) |
void | visible_add (hk_dsvisible *v) |
void | visible_remove (hk_dsvisible *v) |
virtual void | driver_specific_transaction_begin (hk_string) |
virtual void | driver_specific_transaction_commit (hk_string) |
virtual void | driver_specific_transaction_rollback (hk_string) |
virtual unsigned long | driver_specific_max_rows (void) |
virtual bool | driver_specific_set_accessmode (enum_accessmode) |
virtual bool | driver_specific_batch_enable (void) |
virtual bool | driver_specific_batch_disable (void) |
virtual bool | driver_specific_batch_goto_next (void) |
virtual bool | driver_specific_batch_goto_previous (void) |
virtual bool | driver_specific_enable (void) |
virtual bool | driver_specific_disable (void) |
virtual list< hk_column * > * | driver_specific_columns (void) |
virtual bool | driver_specific_goto_row (unsigned long r) |
virtual hk_column * | driver_specific_new_column (void) |
virtual bool | driver_specific_update_data (void) |
virtual bool | driver_specific_delete_data_at (unsigned long) |
virtual bool | driver_specific_insert_data (void) |
virtual bool | driver_specific_create_table_now (void) |
virtual bool | driver_specific_alter_table_now (void) |
virtual bool | driver_specific_create_view_now (void) |
virtual bool | driver_specific_alter_view_now (void) |
virtual void | driver_specific_before_drop_table (void) |
virtual void | filelist_changes (listtype t) |
virtual list< indexclass > * | driver_specific_indices (void) |
virtual bool | driver_specific_drop_index (const hk_string &i) |
virtual bool | driver_specific_create_index (const hk_string &name, bool unique, list< hk_string > &fields) |
virtual void | before_connection_disconnects (void) |
virtual void | before_source_vanishes (void) |
virtual void | driver_specific_after_copy_table () |
virtual bool | driver_specific_load_view () |
virtual void | driver_specific_create_viewsql () |
virtual bool | driver_specific_add_reference (const referentialclass &) |
virtual bool | driver_specific_drop_reference (const hk_string &) |
virtual void | driver_specific_referenceslist (void) |
void | depending_ds_add (hk_datasource *d) |
void | depending_ds_remove (hk_datasource *d) |
void | depending_on_datasource_row_change (bool take_changed_data=false) |
void | depending_on_datasource_data_has_changed (void) |
void | depending_on_datasource_after_store_changed_data (void) |
void | depending_on_datasource_insertmode (void) |
void | depending_on_datasource_before_update_row (void) |
void | depending_on_datasource_after_update_row (void) |
void | reload_data (bool take_changed_data=false) |
void | create_actual_row_where_statement (void) |
hk_string | create_row_where_statement_at (unsigned long int position, bool withwhere=true) |
void | create_new_sql_statement (bool take_changed_data=false) |
hk_string | whole_datasource_where_statement (bool take_changed_data=false) |
void | print_sql (void) |
void | clear_columnlist (void) |
void | clear_modecolumnlists (void) |
void | clear_visiblelist (void) |
void | parse_sql (void) |
virtual bool | update_row (enum_interaction c=interactive) |
virtual bool | insert_row (enum_interaction c=interactive) |
virtual bool | delete_row (enum_interaction c=interactive) |
void | parse_fieldpart (void) |
void | parse_tablepart (void) |
void | set_has_changed (void) |
void | set_has_not_changed (void) |
hk_string | delimit_identifier (const hk_string &) |
void | inform_before_row_change (void) |
void | inform_visible_objects_batch_goto_next (void) |
void | inform_visible_objects_batch_goto_previous (void) |
void | inform_visible_objects_before_store_changed_data (void) |
void | inform_visible_objects_after_store_changed_data (void) |
void | inform_visible_objects_row_change (void) |
void | inform_visible_objects_row_add (void) |
void | inform_visible_objects_row_delete (void) |
void | inform_visible_objects_before_insert_row (void) |
void | inform_before_enable (void) |
void | inform_before_disable (void) |
void | inform_visible_objects_ds_disable (void) |
void | inform_visible_objects_ds_enable (void) |
void | inform_depending_ds_goto_row (void) |
void | inform_depending_ds_store_data (void) |
void | inform_depending_ds_data_has_changed (void) |
void | inform_depending_ds_after_store_changed_data (void) |
void | inform_depending_ds_before_update_row (void) |
void | inform_depending_ds_after_update_row (void) |
void | inform_depending_ds_disable (void) |
void | inform_depending_ds_enable (void) |
void | inform_depending_ds_insertmode (void) |
void | inform_visible_objects_new_columns_created (void) |
void | inform_visible_objects_before_columns_deleted (void) |
void | inform_visible_objects_insertmode (void) |
void | inform_when_table_structure_changes (void) |
void | inform_when_indexlist_changes (void) |
void | execute_visible_object_script_before_update (void) |
void | execute_visible_object_script_after_update (void) |
void | execute_visible_object_before_row_change (void) |
void | execute_visible_object_after_row_change (void) |
void | execute_visible_object_before_delete (void) |
void | execute_visible_object_after_delete (void) |
void | execute_visible_object_before_insert (void) |
void | execute_visible_object_after_insert (void) |
hk_string | new_referencename (const referentialclass &) |
bool | is_newreferencename (const hk_string &) |
Protected Attributes |
bool | p_casesensitive |
bool | p_enabled |
bool | p_readonly |
bool | p_primary_key_used |
bool | p_ignore_changed_data |
unsigned long | p_counter |
hk_database * | p_database |
list< hk_column * > * | p_columns |
list< class_altercolumns > | p_altercolumns |
list< hk_string > | p_deletecolumns |
list< hk_column * > | p_newcolumns |
list< hk_string > | depending_this_fields |
list< hk_string > | depending_master_fields |
struct_parsed_sql * | p_parsed_sql |
hk_string | p_sql |
hk_string | p_viewsql |
hk_string | p_actual_row_where |
bool | p_automatic_data_update |
hk_actionquery * | p_actionquery |
hk_string | p_datetimeformat |
hk_string | p_dateformat |
hk_string | p_timeformat |
hk_string | p_sql_delimiter |
hk_string | p_true |
hk_string | p_false |
bool | p_tablesql_set |
list< hk_datasource * > | p_dependinglist |
enum_tablemodes | p_mode |
list< referentialclass > | p_references |
Static Protected Attributes |
static voidfunction * | p_enablefunction |
static long | p_enablefunctioncounter |
Friends |
class | hk_column |
class | hk_dsvisible |
class | hk_database |
class | hk_presentation |
Classes |
class | class_altercolumns |
class | fieldoriginclass |
class | indexclass |
class | struct_parsed_sql |
Two types of this class can be distinguished. Tables and Resultqueries.
Resultqueries are Queries with a SELECT - SQL-statement. The resulting data cannot be edited or manipulated.
Tables are a special form of resultqueries. The SQL-statement is fixed ("SELECT * FROM <tablename>), but the resulting dataset can be edited.