From 233346fd7f804de732e28461b6a9d8b0042213ac Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 4 Dec 2018 18:57:50 -0600 Subject: [PATCH] Progress: continue development on database abstraction --- .../database/classes/database_alter_aggregate.php | 4 +- .../database/classes/database_alter_coalation.php | 4 +- .../database/classes/database_alter_conversion.php | 4 +- .../database/classes/database_alter_database.php | 4 +- .../classes/database_alter_default_privileges.php | 4 +- common/database/classes/database_alter_domain.php | 4 +- .../classes/database_alter_event_trigger.php | 4 +- .../database/classes/database_alter_extension.php | 2 +- .../database_alter_foreign_data_wrapper.php | 4 +- .../classes/database_alter_foreign_table.php | 233 ++++++++++++++------ .../database_alter_foreign_table_action.php | 139 ++++++++++++ .../database/classes/database_alter_function.php | 2 +- common/database/classes/database_alter_group.php | 2 +- common/database/classes/database_alter_index.php | 2 +- .../database/classes/database_alter_language.php | 2 +- .../classes/database_alter_large_object.php | 2 +- .../classes/database_alter_materialized_view.php | 2 +- .../database/classes/database_alter_operator.php | 2 +- .../classes/database_alter_operator_class.php | 2 +- .../classes/database_alter_operator_family.php | 2 +- common/database/classes/database_alter_policy.php | 2 +- .../classes/database_alter_publication.php | 2 +- common/database/classes/database_alter_role.php | 2 +- common/database/classes/database_alter_rule.php | 2 +- common/database/classes/database_alter_schema.php | 2 +- common/database/classes/database_alter_table.php | 2 +- .../database/classes/database_alter_tablespace.php | 2 +- .../database_alter_text_search_configuration.php | 2 +- .../database_alter_text_search_dictionary.php | 2 +- .../classes/database_alter_text_search_parser.php | 2 +- .../database_alter_text_search_template.php | 2 +- common/database/classes/database_alter_trigger.php | 2 +- common/database/classes/database_alter_type.php | 2 +- common/database/classes/database_alter_user.php | 2 +- .../classes/database_alter_user_mapping.php | 2 +- common/database/classes/database_alter_view.php | 2 +- common/database/classes/database_analyze.php | 2 +- common/database/classes/database_begin.php | 2 +- common/database/classes/database_checkpoint.php | 2 +- common/database/classes/database_close.php | 2 +- common/database/classes/database_cluster.php | 2 +- common/database/classes/database_comment.php | 2 +- common/database/classes/database_commit.php | 2 +- .../database/classes/database_commit_prepared.php | 2 +- common/database/classes/database_copy.php | 2 +- .../classes/database_create_access_method.php | 2 +- .../database/classes/database_create_aggregate.php | 2 +- common/database/classes/database_create_cast.php | 2 +- .../database/classes/database_create_collation.php | 2 +- .../classes/database_create_conversion.php | 2 +- .../database/classes/database_create_database.php | 2 +- common/database/classes/database_create_domain.php | 2 +- .../classes/database_create_event_trigger.php | 2 +- .../database/classes/database_create_extension.php | 2 +- .../database/classes/database_create_foreign.php | 2 +- .../database_create_foreign_data_wrapper.php | 2 +- .../database/classes/database_create_function.php | 2 +- common/database/classes/database_create_group.php | 2 +- common/database/classes/database_create_index.php | 2 +- .../database/classes/database_create_language.php | 2 +- .../classes/database_create_materialized_view.php | 2 +- .../database/classes/database_create_operator.php | 2 +- .../classes/database_create_operator_class.php | 2 +- .../classes/database_create_operator_family.php | 2 +- common/database/classes/database_create_policy.php | 2 +- .../classes/database_create_publication.php | 2 +- common/database/classes/database_create_role.php | 2 +- common/database/classes/database_create_rule.php | 2 +- common/database/classes/database_create_schema.php | 2 +- .../database/classes/database_create_sequence.php | 2 +- common/database/classes/database_create_server.php | 2 +- .../classes/database_create_statistics.php | 2 +- .../classes/database_create_subscription.php | 2 +- common/database/classes/database_create_table.php | 2 +- .../database/classes/database_create_table_as.php | 2 +- .../classes/database_create_tablespace.php | 2 +- .../database_create_text_search_configuration.php | 2 +- .../database_create_text_search_dictionary.php | 2 +- .../classes/database_create_text_search_parser.php | 2 +- .../database_create_text_search_template.php | 2 +- .../database/classes/database_create_transform.php | 2 +- .../database/classes/database_create_trigger.php | 2 +- common/database/classes/database_create_type.php | 2 +- common/database/classes/database_create_user.php | 2 +- .../classes/database_create_user_mapping.php | 2 +- common/database/classes/database_create_view.php | 2 +- common/database/classes/database_deallocate.php | 2 +- common/database/classes/database_declare.php | 2 +- common/database/classes/database_delete.php | 2 +- common/database/classes/database_discard.php | 2 +- common/database/classes/database_do.php | 2 +- .../classes/database_drop_access_method.php | 2 +- .../database/classes/database_drop_aggregate.php | 2 +- common/database/classes/database_drop_cast.php | 2 +- .../database/classes/database_drop_collation.php | 2 +- .../database/classes/database_drop_conversion.php | 2 +- common/database/classes/database_drop_database.php | 2 +- common/database/classes/database_drop_domain.php | 2 +- .../classes/database_drop_event_trigger.php | 2 +- .../database/classes/database_drop_extension.php | 2 +- .../classes/database_drop_foreign_data_wrapper.php | 2 +- .../classes/database_drop_foreign_table.php | 2 +- common/database/classes/database_drop_function.php | 2 +- common/database/classes/database_drop_group.php | 2 +- common/database/classes/database_drop_index.php | 2 +- common/database/classes/database_drop_language.php | 2 +- .../classes/database_drop_materialized_view.php | 2 +- common/database/classes/database_drop_operator.php | 2 +- .../classes/database_drop_operator_class.php | 2 +- .../classes/database_drop_operator_family.php | 2 +- common/database/classes/database_drop_owned.php | 2 +- common/database/classes/database_drop_policy.php | 2 +- .../database/classes/database_drop_publication.php | 2 +- common/database/classes/database_drop_role.php | 2 +- common/database/classes/database_drop_rule.php | 2 +- common/database/classes/database_drop_schema.php | 2 +- common/database/classes/database_drop_sequence.php | 2 +- common/database/classes/database_drop_server.php | 2 +- .../database/classes/database_drop_statistics.php | 2 +- .../classes/database_drop_subscription.php | 2 +- common/database/classes/database_drop_table.php | 2 +- .../database/classes/database_drop_tablespace.php | 2 +- .../database_drop_text_search_configuration.php | 2 +- .../database_drop_text_search_dictionary.php | 2 +- .../classes/database_drop_text_search_parser.php | 2 +- .../classes/database_drop_text_search_template.php | 2 +- .../database/classes/database_drop_transform.php | 2 +- common/database/classes/database_drop_trigger.php | 2 +- common/database/classes/database_drop_type.php | 2 +- common/database/classes/database_drop_user.php | 2 +- .../classes/database_drop_user_mapping.php | 2 +- common/database/classes/database_drop_view.php | 2 +- common/database/classes/database_end.php | 2 +- common/database/classes/database_execute.php | 2 +- common/database/classes/database_explain.php | 2 +- common/database/classes/database_fetch.php | 2 +- common/database/classes/database_grant.php | 2 +- .../classes/database_import_foreign_schema.php | 2 +- common/database/classes/database_insert.php | 2 +- common/database/classes/database_listen.php | 2 +- common/database/classes/database_load.php | 2 +- common/database/classes/database_lock.php | 2 +- common/database/classes/database_member_object.php | 4 +- common/database/classes/database_move.php | 2 +- common/database/classes/database_notify.php | 2 +- common/database/classes/database_prepare.php | 2 +- .../classes/database_prepare_transaction.php | 2 +- common/database/classes/database_query.php | 8 +- .../database/classes/database_reassign_owned.php | 2 +- .../classes/database_refresh_materialized.php | 2 +- common/database/classes/database_reindex.php | 2 +- .../classes/database_release_savepoint.php | 2 +- common/database/classes/database_reset.php | 2 +- common/database/classes/database_revoke.php | 2 +- common/database/classes/database_rollback.php | 2 +- .../classes/database_rollback_prepared.php | 2 +- .../classes/database_rollback_to_savepoint.php | 2 +- common/database/classes/database_savepoint.php | 2 +- .../database/classes/database_security_label.php | 2 +- common/database/classes/database_select.php | 2 +- common/database/classes/database_select_into.php | 2 +- common/database/classes/database_set.php | 2 +- .../database/classes/database_set_constraints.php | 2 +- common/database/classes/database_set_role.php | 2 +- .../classes/database_set_session_authorization.php | 2 +- .../database/classes/database_set_transaction.php | 2 +- common/database/classes/database_show.php | 2 +- .../classes/database_start_transaction.php | 2 +- common/database/classes/database_string.php | 5 + common/database/classes/database_truncate.php | 2 +- common/database/classes/database_unlisten.php | 2 +- common/database/classes/database_update.php | 2 +- common/database/classes/database_vacuum.php | 2 +- common/database/classes/database_values.php | 2 +- .../database/enumerations/database_constraint.php | 18 ++ .../enumerations/database_enable_trigger.php | 20 ++ common/database/traits/database_constraint.php | 240 +++++++++++++++++++++ common/database/traits/database_enable_trigger.php | 208 ++++++++++++++++++ common/database/traits/database_handler.php | 23 +- common/database/traits/database_in_schema.php | 4 + common/database/traits/database_inherit.php | 4 + common/database/traits/database_options.php | 4 + common/database/traits/database_order_by.php | 4 + common/database/traits/database_owner_to.php | 4 + common/database/traits/database_rename_column.php | 4 + common/database/traits/database_rename_to.php | 4 + common/database/traits/database_reset.php | 5 +- common/database/traits/database_set.php | 5 +- common/database/traits/database_set_schema.php | 4 + common/database/traits/database_set_tablespace.php | 4 + common/database/traits/database_set_with_oids.php | 4 + common/database/traits/database_validator.php | 23 +- 192 files changed, 1049 insertions(+), 276 deletions(-) create mode 100644 common/database/classes/database_alter_foreign_table_action.php create mode 100644 common/database/enumerations/database_constraint.php create mode 100644 common/database/enumerations/database_enable_trigger.php create mode 100644 common/database/traits/database_constraint.php create mode 100644 common/database/traits/database_enable_trigger.php diff --git a/common/database/classes/database_alter_aggregate.php b/common/database/classes/database_alter_aggregate.php index a08feb1..c40fa31 100644 --- a/common/database/classes/database_alter_aggregate.php +++ b/common/database/classes/database_alter_aggregate.php @@ -28,7 +28,7 @@ class c_database_alter_aggregate extends c_database_query { use t_database_owner_to; use t_database_set_schema; - protected const pr_QUERY_COMMAND = 'alter aggregate'; + protected const p_QUERY_COMMAND = 'alter aggregate'; // @todo: move these into their own traits. protected $aggregate_signatures; @@ -366,7 +366,7 @@ class c_database_alter_aggregate extends c_database_query { } unset($aggregate_signatures); - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $this->name; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_alter_coalation.php b/common/database/classes/database_alter_coalation.php index 0058cb4..0673de4 100644 --- a/common/database/classes/database_alter_coalation.php +++ b/common/database/classes/database_alter_coalation.php @@ -27,7 +27,7 @@ class c_database_alter_coalation extends c_database_query { use t_database_owner_to; use t_database_set_schema; - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** * Class constructor. @@ -153,7 +153,7 @@ class c_database_alter_coalation extends c_database_query { return new c_base_return_false(); } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $this->name; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_alter_conversion.php b/common/database/classes/database_alter_conversion.php index 28ee6e7..36084fd 100644 --- a/common/database/classes/database_alter_conversion.php +++ b/common/database/classes/database_alter_conversion.php @@ -26,7 +26,7 @@ class c_database_alter_conversion extends c_database_query { use t_database_owner_to; use t_database_set_schema; - protected const pr_QUERY_COMMAND = 'alter conversion'; + protected const p_QUERY_COMMAND = 'alter conversion'; /** @@ -98,7 +98,7 @@ class c_database_alter_conversion extends c_database_query { return new c_base_return_false(); } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $this->name; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_alter_database.php b/common/database/classes/database_alter_database.php index 3afd766..4e8001b 100644 --- a/common/database/classes/database_alter_database.php +++ b/common/database/classes/database_alter_database.php @@ -34,7 +34,7 @@ class c_database_alter_database extends c_database_query { use t_database_set_tablespace; use t_database_reset; - protected const pr_QUERY_COMMAND = 'alter database'; + protected const p_QUERY_COMMAND = 'alter database'; protected $option; @@ -172,7 +172,7 @@ class c_database_alter_database extends c_database_query { return new c_base_return_false(); } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $this->name; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_alter_default_privileges.php b/common/database/classes/database_alter_default_privileges.php index 35a9808..2978262 100644 --- a/common/database/classes/database_alter_default_privileges.php +++ b/common/database/classes/database_alter_default_privileges.php @@ -29,7 +29,7 @@ class c_database_alter_default_priveleges extends c_database_query { use t_database_in_schema; use t_database_action; - protected const pr_QUERY_COMMAND = 'alter default privileges'; + protected const p_QUERY_COMMAND = 'alter default privileges'; protected $abbreviated; protected $cascade; @@ -613,7 +613,7 @@ class c_database_alter_default_priveleges extends c_database_query { } } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $this->name; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_alter_domain.php b/common/database/classes/database_alter_domain.php index 3e5cfb3..0106a57 100644 --- a/common/database/classes/database_alter_domain.php +++ b/common/database/classes/database_alter_domain.php @@ -33,7 +33,7 @@ class c_database_alter_coalation extends c_database_query { use t_database_set_schema; use t_database_action; - protected const pr_QUERY_COMMAND = 'alter domain'; + protected const p_QUERY_COMMAND = 'alter domain'; protected $expression; protected $constraint; @@ -353,7 +353,7 @@ class c_database_alter_coalation extends c_database_query { return new c_base_return_false(); } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $this->name; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_alter_event_trigger.php b/common/database/classes/database_alter_event_trigger.php index 1cd5bcf..9f5394a 100644 --- a/common/database/classes/database_alter_event_trigger.php +++ b/common/database/classes/database_alter_event_trigger.php @@ -29,7 +29,7 @@ class c_database_alter_coalation extends c_database_query { use t_database_owner_to; use t_database_rename_to; - protected const pr_QUERY_COMMAND = 'alter event trigger'; + protected const p_QUERY_COMMAND = 'alter event trigger'; /** @@ -128,7 +128,7 @@ class c_database_alter_coalation extends c_database_query { return new c_base_return_false(); } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_alter_extension.php b/common/database/classes/database_alter_extension.php index 87fc0e5..6e29771 100644 --- a/common/database/classes/database_alter_extension.php +++ b/common/database/classes/database_alter_extension.php @@ -27,7 +27,7 @@ class c_database_alter_extension extends c_database_query { use t_database_action_parameter; use t_database_name; - protected const pr_QUERY_COMMAND = 'alter extension'; + protected const p_QUERY_COMMAND = 'alter extension'; protected $member_object; diff --git a/common/database/classes/database_alter_foreign_data_wrapper.php b/common/database/classes/database_alter_foreign_data_wrapper.php index 6470e30..03df618 100644 --- a/common/database/classes/database_alter_foreign_data_wrapper.php +++ b/common/database/classes/database_alter_foreign_data_wrapper.php @@ -32,7 +32,7 @@ class c_database_alter_foreign_data_wrapper extends c_database_query { use t_database_rename_to; use t_database_validator; - protected const pr_QUERY_COMMAND = 'alter foreign data wrapper'; + protected const p_QUERY_COMMAND = 'alter foreign data wrapper'; /** @@ -125,7 +125,7 @@ class c_database_alter_foreign_data_wrapper extends c_database_query { $actions .= ' ' . $this->p_do_build_options(); } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $this->name; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_alter_foreign_table.php b/common/database/classes/database_alter_foreign_table.php index 7f5dd01..052c001 100644 --- a/common/database/classes/database_alter_foreign_table.php +++ b/common/database/classes/database_alter_foreign_table.php @@ -1,23 +1,20 @@ action = NULL; $this->name = NULL; - $this->options = NULL; - $this->owner_to = NULL; $this->rename_column = NULL; $this->rename_to = NULL; $this->set_schema = NULL; - $this->set_with_oids = NULL; + $this->actions = NULL; $this->if_exists = NULL; $this->include_descendents = NULL; $this->only = NULL; @@ -66,15 +57,12 @@ class c_database_alter_foreign_table extends c_database_query { public function __destruct() { parent::__destruct(); - unset($this->action); unset($this->name); - unset($this->options); - unset($this->owner_to); unset($this->rename_column); unset($this->rename_to); unset($this->set_schema); - unset($this->set_with_oids); + unset($this->actions); unset($this->if_exists); unset($this->include_descendents); unset($this->only); @@ -102,6 +90,39 @@ class c_database_alter_foreign_table extends c_database_query { } /** + * Set or append and action. + * + * @param c_database_alter_foreign_table_action|null $action + * A specific action to this class. + * Set to NULL to disable. + * When NULL, this will remove all actions. + * + * @return c_base_return_status + * TRUE on success, FALSE otherwise. + * FALSE with error bit set is returned on error. + */ + public function set_action($action) { + if (is_null($action)) { + $this->actions = NULL; + return new c_base_return_true(); + } + + if (is_string($action)) { + if (!is_array($this->actions)) { + $this->actions = []; + } + + $this->actions[] = $action; + } + else { + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + + return new c_base_return_true(); + } + + /** * Assigns IF EXISTS. * * @param bool|null $if_exists @@ -180,6 +201,104 @@ class c_database_alter_foreign_table extends c_database_query { } /** + * Get an action or all actions. + * + * @param int|null $index + * (optional) Get the action at the specified index. + * When NULL, all actions are returned. + * + * @return c_database_alter_foreign_table_action|c_base_return_array|c_base_return_null + * An array of actions or NULL if not defined. + * A single action is returned if $index is an integer. + * NULL with the error bit set is returned on error. + */ + public function get_action($index = NULL) { + if (is_null($this->actions)) { + return new c_base_return_null(); + } + + if (is_null($index)) { + if (is_array($this->actions)) { + return c_base_return_array::s_new($this->actions); + } + } + else { + if (is_int($index) && array_key_exists($index, $this->actions) && $this->actions[$index] instanceof c_database_alter_foreign_table_action) { + return $this->actions[$index]; + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'actions[index]', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'actions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Get the if exists setting. + * + * @return c_base_return_bool|c_base_return_null + * A boolean representing the IF EXISTS setting. + * NULL is returned if not defined. + * NULL with the error bit set is returned on error. + */ + public function get_if_exists($index = NULL) { + if (is_null($this->if_exists)) { + return new c_base_return_null(); + } + + if (is_bool($index)) { + return c_base_return_bool::s_new($this->if_exists); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'if_exists', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Get the include decendents setting. + * + * @return c_base_return_bool|c_base_return_null + * A boolean representing the '*' setting. + * NULL is returned if not defined. + * NULL with the error bit set is returned on error. + */ + public function get_include_decendents($index = NULL) { + if (is_null($this->include_decendents)) { + return new c_base_return_null(); + } + + if (is_bool($index)) { + return c_base_return_bool::s_new($this->include_decendents); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'include_decendents', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Get the set only setting. + * + * @return c_base_return_bool|c_base_return_null + * A boolean representing the ONLY setting. + * NULL is returned if not defined. + * NULL with the error bit set is returned on error. + */ + public function get_set_only($index = NULL) { + if (is_null($this->set_only)) { + return new c_base_return_null(); + } + + if (is_bool($index)) { + return c_base_return_bool::s_new($this->set_only); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'set_only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** * Implements do_build(). */ public function do_build() { @@ -187,85 +306,61 @@ class c_database_alter_foreign_table extends c_database_query { return new c_base_return_false(); } - $action = NULL; + $value = NULL; if ($this->if_exists) { - $action = ' ' . c_database_string::IF_EXISTS; + $value = ' ' . c_database_string::IF_EXISTS; } if (is_array($this->rename_column)) { if ($this->only) { - $action .= is_null($action) ? '' : ' '; - $action .= c_database_string::ONLY; + $value .= is_null($value) ? '' : ' '; + $value .= c_database_string::ONLY; } - $action .= ' ' . $this->p_do_build_rename_column(); + $value .= ' ' . $this->p_do_build_rename_column(); } else if (is_array($this->rename_to)) { - $action .= is_null($action) ? '' : ' '; - $action .= $this->p_do_build_rename_to(); + $value .= is_null($value) ? '' : ' '; + $value .= $this->p_do_build_rename_to(); } else if (is_array($this->set_schema)) { - $action .= is_null($action) ? '' : ' '; - $action .= $this->p_do_build_set_schema(); + $value .= is_null($value) ? '' : ' '; + $value .= $this->p_do_build_set_schema(); } else { if ($this->only) { - $action .= is_null($action) ? '' : ' '; - $action .= c_database_string::ONLY; + $value .= is_null($value) ? '' : ' '; + $value .= c_database_string::ONLY; } - $action .= is_null($action) ? '' : ' '; - // @todo - -// sub-forms: -// ADD COLUMN -// DROP COLUMN -// SET DATA TYPE -// SET DEFAULT -// SET NOT NULL -// SET STATISTICS -// SET -// RESET -// SET STORAGE -// ADD ... -// VALIDATE CONSTRAINT -// DROP CONSTRAINT -// DISABLE/ENABLE -// SET WITH OIDS -// SET WITHOUT OIDS -// INHERIT -// NO INHERIT -// OWNER -// OPTIONS -// RENAME -// SET SCHEMA - else if (is_bool($this->set_with_oids)) { - $action .= $this->p_do_build_set_with_oids(); - } - else if (is_array($this->inherit)) { - $action .= $this->p_do_build_inherit(); - } - else if (is_array($this->owner_to)) { - $action .= $this->p_do_build_owner_to(); - } - else if (is_array($this->options)) { - $action .= $this->p_do_build_options(); + $value .= is_null($value) ? '' : ' '; + if (is_array($this->actions) && !empty($this->actions)) { + $actions = []; + foreach ($this->actions as $action) { + if ($action instanceof c_database_alter_foreign_table_action && $action->do_build() instanceof c_base_return_true) { + $actions[] = $action->get_value_exact(); + } + } + unset($action); + + $value .= implode(', ', $actions); + unset($actions); } else { - unset($action); + unset($value); return new c_base_return_false(); } } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $this->name; if ($this->include_descendents) { $this->value .' *'; } - $this->value .= ' ' . $action; - unset($action); + $this->value .= ' ' . $value; + unset($value); return new c_base_return_true(); } diff --git a/common/database/classes/database_alter_foreign_table_action.php b/common/database/classes/database_alter_foreign_table_action.php new file mode 100644 index 0000000..e3b2d79 --- /dev/null +++ b/common/database/classes/database_alter_foreign_table_action.php @@ -0,0 +1,139 @@ +add_column = NULL; + $this->alter_column = NULL; + $this->constraint = NULL; + $this->drop_column = NULL; + $this->enable_trigger = NULL; + $this->inherit = NULL; + $this->options = NULL; + $this->owner_to = NULL; + $this->set_with_oids = NULL; + } + + /** + * Class destructor. + */ + public function __destruct() { + parent::__destruct(); + + unset($this->add_column); + unset($this->alter_column); + unset($this->constaint); + unset($this->drop_column); + unset($this->enable_trigger); + unset($this->inherit); + unset($this->options); + unset($this->owner_to); + unset($this->set_with_oids); + } + + /** + * @see: t_base_return_value::p_s_new() + */ + public static function s_new($value) { + return self::p_s_new($value, __CLASS__); + } + + /** + * @see: t_base_return_value::p_s_value() + */ + public static function s_value($return) { + return self::p_s_value($return, __CLASS__); + } + + /** + * @see: t_base_return_value_exact::p_s_value_exact() + */ + public static function s_value_exact($return) { + return self::p_s_value_exact($return, __CLASS__, ''); + } + + /** + * Implements do_build(). + */ + public function do_build() { + $value = NULL; + if (is_array($this->add_column)) { + $value = $this->p_do_build_add_column(); + } + else if (is_array($this->alter_column)) { + $value = $this->p_do_build_alter_column(); + } + else if (is_array($this->constraint)) { + $value = $this->p_do_build_constraint(); + } + else if (is_array($this->drop_column)) { + $value = $this->p_do_build_drop_column(); + } + else if (is_array($this->enable_trigger)) { + $value = $this->p_do_build_enable_trigger(); + } + else if (is_array($this->inherit)) { + $value = $this->p_do_build_inherit(); + } + else if (is_array($this->options)) { + $value = '(' . $this->p_do_build_options() . ')'; + } + else if (is_array($this->owner_to)) { + $value = $this->p_do_build_owner_to(); + } + else if (is_bool($this->set_with_oids)) { + $value = $this->p_do_build_set_with_oids(); + } + else { + unset($value); + return new c_base_return_false(); + } + + $this->value = static::p_QUERY_COMMAND; + $this->value .= ' ' . $value; + unset($value); + + return new c_base_return_true(); + } +} diff --git a/common/database/classes/database_alter_function.php b/common/database/classes/database_alter_function.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_function.php +++ b/common/database/classes/database_alter_function.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_group.php b/common/database/classes/database_alter_group.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_group.php +++ b/common/database/classes/database_alter_group.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_index.php b/common/database/classes/database_alter_index.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_index.php +++ b/common/database/classes/database_alter_index.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_language.php b/common/database/classes/database_alter_language.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_language.php +++ b/common/database/classes/database_alter_language.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_large_object.php b/common/database/classes/database_alter_large_object.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_large_object.php +++ b/common/database/classes/database_alter_large_object.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_materialized_view.php b/common/database/classes/database_alter_materialized_view.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_materialized_view.php +++ b/common/database/classes/database_alter_materialized_view.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_operator.php b/common/database/classes/database_alter_operator.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_operator.php +++ b/common/database/classes/database_alter_operator.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_operator_class.php b/common/database/classes/database_alter_operator_class.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_operator_class.php +++ b/common/database/classes/database_alter_operator_class.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_operator_family.php b/common/database/classes/database_alter_operator_family.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_operator_family.php +++ b/common/database/classes/database_alter_operator_family.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_policy.php b/common/database/classes/database_alter_policy.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_policy.php +++ b/common/database/classes/database_alter_policy.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_publication.php b/common/database/classes/database_alter_publication.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_publication.php +++ b/common/database/classes/database_alter_publication.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_role.php b/common/database/classes/database_alter_role.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_role.php +++ b/common/database/classes/database_alter_role.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_rule.php b/common/database/classes/database_alter_rule.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_rule.php +++ b/common/database/classes/database_alter_rule.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_schema.php b/common/database/classes/database_alter_schema.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_schema.php +++ b/common/database/classes/database_alter_schema.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_table.php b/common/database/classes/database_alter_table.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_table.php +++ b/common/database/classes/database_alter_table.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_tablespace.php b/common/database/classes/database_alter_tablespace.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_tablespace.php +++ b/common/database/classes/database_alter_tablespace.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_text_search_configuration.php b/common/database/classes/database_alter_text_search_configuration.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_text_search_configuration.php +++ b/common/database/classes/database_alter_text_search_configuration.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_text_search_dictionary.php b/common/database/classes/database_alter_text_search_dictionary.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_text_search_dictionary.php +++ b/common/database/classes/database_alter_text_search_dictionary.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_text_search_parser.php b/common/database/classes/database_alter_text_search_parser.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_text_search_parser.php +++ b/common/database/classes/database_alter_text_search_parser.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_text_search_template.php b/common/database/classes/database_alter_text_search_template.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_text_search_template.php +++ b/common/database/classes/database_alter_text_search_template.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_trigger.php b/common/database/classes/database_alter_trigger.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_trigger.php +++ b/common/database/classes/database_alter_trigger.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_type.php b/common/database/classes/database_alter_type.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_type.php +++ b/common/database/classes/database_alter_type.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_user.php b/common/database/classes/database_alter_user.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_user.php +++ b/common/database/classes/database_alter_user.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_user_mapping.php b/common/database/classes/database_alter_user_mapping.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_user_mapping.php +++ b/common/database/classes/database_alter_user_mapping.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_alter_view.php b/common/database/classes/database_alter_view.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_alter_view.php +++ b/common/database/classes/database_alter_view.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_analyze.php b/common/database/classes/database_analyze.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_analyze.php +++ b/common/database/classes/database_analyze.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_begin.php b/common/database/classes/database_begin.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_begin.php +++ b/common/database/classes/database_begin.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_checkpoint.php b/common/database/classes/database_checkpoint.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_checkpoint.php +++ b/common/database/classes/database_checkpoint.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_close.php b/common/database/classes/database_close.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_close.php +++ b/common/database/classes/database_close.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_cluster.php b/common/database/classes/database_cluster.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_cluster.php +++ b/common/database/classes/database_cluster.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_comment.php b/common/database/classes/database_comment.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_comment.php +++ b/common/database/classes/database_comment.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_commit.php b/common/database/classes/database_commit.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_commit.php +++ b/common/database/classes/database_commit.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_commit_prepared.php b/common/database/classes/database_commit_prepared.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_commit_prepared.php +++ b/common/database/classes/database_commit_prepared.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_copy.php b/common/database/classes/database_copy.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_copy.php +++ b/common/database/classes/database_copy.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_access_method.php b/common/database/classes/database_create_access_method.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_access_method.php +++ b/common/database/classes/database_create_access_method.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_aggregate.php b/common/database/classes/database_create_aggregate.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_aggregate.php +++ b/common/database/classes/database_create_aggregate.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_cast.php b/common/database/classes/database_create_cast.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_cast.php +++ b/common/database/classes/database_create_cast.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_collation.php b/common/database/classes/database_create_collation.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_collation.php +++ b/common/database/classes/database_create_collation.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_conversion.php b/common/database/classes/database_create_conversion.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_conversion.php +++ b/common/database/classes/database_create_conversion.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_database.php b/common/database/classes/database_create_database.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_database.php +++ b/common/database/classes/database_create_database.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_domain.php b/common/database/classes/database_create_domain.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_domain.php +++ b/common/database/classes/database_create_domain.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_event_trigger.php b/common/database/classes/database_create_event_trigger.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_event_trigger.php +++ b/common/database/classes/database_create_event_trigger.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_extension.php b/common/database/classes/database_create_extension.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_extension.php +++ b/common/database/classes/database_create_extension.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_foreign.php b/common/database/classes/database_create_foreign.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_foreign.php +++ b/common/database/classes/database_create_foreign.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_foreign_data_wrapper.php b/common/database/classes/database_create_foreign_data_wrapper.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_foreign_data_wrapper.php +++ b/common/database/classes/database_create_foreign_data_wrapper.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_function.php b/common/database/classes/database_create_function.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_function.php +++ b/common/database/classes/database_create_function.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_group.php b/common/database/classes/database_create_group.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_group.php +++ b/common/database/classes/database_create_group.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_index.php b/common/database/classes/database_create_index.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_index.php +++ b/common/database/classes/database_create_index.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_language.php b/common/database/classes/database_create_language.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_language.php +++ b/common/database/classes/database_create_language.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_materialized_view.php b/common/database/classes/database_create_materialized_view.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_materialized_view.php +++ b/common/database/classes/database_create_materialized_view.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_operator.php b/common/database/classes/database_create_operator.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_operator.php +++ b/common/database/classes/database_create_operator.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_operator_class.php b/common/database/classes/database_create_operator_class.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_operator_class.php +++ b/common/database/classes/database_create_operator_class.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_operator_family.php b/common/database/classes/database_create_operator_family.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_operator_family.php +++ b/common/database/classes/database_create_operator_family.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_policy.php b/common/database/classes/database_create_policy.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_policy.php +++ b/common/database/classes/database_create_policy.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_publication.php b/common/database/classes/database_create_publication.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_publication.php +++ b/common/database/classes/database_create_publication.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_role.php b/common/database/classes/database_create_role.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_role.php +++ b/common/database/classes/database_create_role.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_rule.php b/common/database/classes/database_create_rule.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_rule.php +++ b/common/database/classes/database_create_rule.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_schema.php b/common/database/classes/database_create_schema.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_schema.php +++ b/common/database/classes/database_create_schema.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_sequence.php b/common/database/classes/database_create_sequence.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_sequence.php +++ b/common/database/classes/database_create_sequence.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_server.php b/common/database/classes/database_create_server.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_server.php +++ b/common/database/classes/database_create_server.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_statistics.php b/common/database/classes/database_create_statistics.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_statistics.php +++ b/common/database/classes/database_create_statistics.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_subscription.php b/common/database/classes/database_create_subscription.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_subscription.php +++ b/common/database/classes/database_create_subscription.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_table.php b/common/database/classes/database_create_table.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_table.php +++ b/common/database/classes/database_create_table.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_table_as.php b/common/database/classes/database_create_table_as.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_table_as.php +++ b/common/database/classes/database_create_table_as.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_tablespace.php b/common/database/classes/database_create_tablespace.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_tablespace.php +++ b/common/database/classes/database_create_tablespace.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_text_search_configuration.php b/common/database/classes/database_create_text_search_configuration.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_text_search_configuration.php +++ b/common/database/classes/database_create_text_search_configuration.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_text_search_dictionary.php b/common/database/classes/database_create_text_search_dictionary.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_text_search_dictionary.php +++ b/common/database/classes/database_create_text_search_dictionary.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_text_search_parser.php b/common/database/classes/database_create_text_search_parser.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_text_search_parser.php +++ b/common/database/classes/database_create_text_search_parser.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_text_search_template.php b/common/database/classes/database_create_text_search_template.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_text_search_template.php +++ b/common/database/classes/database_create_text_search_template.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_transform.php b/common/database/classes/database_create_transform.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_transform.php +++ b/common/database/classes/database_create_transform.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_trigger.php b/common/database/classes/database_create_trigger.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_trigger.php +++ b/common/database/classes/database_create_trigger.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_type.php b/common/database/classes/database_create_type.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_type.php +++ b/common/database/classes/database_create_type.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_user.php b/common/database/classes/database_create_user.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_user.php +++ b/common/database/classes/database_create_user.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_user_mapping.php b/common/database/classes/database_create_user_mapping.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_user_mapping.php +++ b/common/database/classes/database_create_user_mapping.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_create_view.php b/common/database/classes/database_create_view.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_create_view.php +++ b/common/database/classes/database_create_view.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_deallocate.php b/common/database/classes/database_deallocate.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_deallocate.php +++ b/common/database/classes/database_deallocate.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_declare.php b/common/database/classes/database_declare.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_declare.php +++ b/common/database/classes/database_declare.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_delete.php b/common/database/classes/database_delete.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_delete.php +++ b/common/database/classes/database_delete.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_discard.php b/common/database/classes/database_discard.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_discard.php +++ b/common/database/classes/database_discard.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_do.php b/common/database/classes/database_do.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_do.php +++ b/common/database/classes/database_do.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_access_method.php b/common/database/classes/database_drop_access_method.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_access_method.php +++ b/common/database/classes/database_drop_access_method.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_aggregate.php b/common/database/classes/database_drop_aggregate.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_aggregate.php +++ b/common/database/classes/database_drop_aggregate.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_cast.php b/common/database/classes/database_drop_cast.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_cast.php +++ b/common/database/classes/database_drop_cast.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_collation.php b/common/database/classes/database_drop_collation.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_collation.php +++ b/common/database/classes/database_drop_collation.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_conversion.php b/common/database/classes/database_drop_conversion.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_conversion.php +++ b/common/database/classes/database_drop_conversion.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_database.php b/common/database/classes/database_drop_database.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_database.php +++ b/common/database/classes/database_drop_database.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_domain.php b/common/database/classes/database_drop_domain.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_domain.php +++ b/common/database/classes/database_drop_domain.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_event_trigger.php b/common/database/classes/database_drop_event_trigger.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_event_trigger.php +++ b/common/database/classes/database_drop_event_trigger.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_extension.php b/common/database/classes/database_drop_extension.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_extension.php +++ b/common/database/classes/database_drop_extension.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_foreign_data_wrapper.php b/common/database/classes/database_drop_foreign_data_wrapper.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_foreign_data_wrapper.php +++ b/common/database/classes/database_drop_foreign_data_wrapper.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_foreign_table.php b/common/database/classes/database_drop_foreign_table.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_foreign_table.php +++ b/common/database/classes/database_drop_foreign_table.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_function.php b/common/database/classes/database_drop_function.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_function.php +++ b/common/database/classes/database_drop_function.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_group.php b/common/database/classes/database_drop_group.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_group.php +++ b/common/database/classes/database_drop_group.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_index.php b/common/database/classes/database_drop_index.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_index.php +++ b/common/database/classes/database_drop_index.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_language.php b/common/database/classes/database_drop_language.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_language.php +++ b/common/database/classes/database_drop_language.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_materialized_view.php b/common/database/classes/database_drop_materialized_view.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_materialized_view.php +++ b/common/database/classes/database_drop_materialized_view.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_operator.php b/common/database/classes/database_drop_operator.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_operator.php +++ b/common/database/classes/database_drop_operator.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_operator_class.php b/common/database/classes/database_drop_operator_class.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_operator_class.php +++ b/common/database/classes/database_drop_operator_class.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_operator_family.php b/common/database/classes/database_drop_operator_family.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_operator_family.php +++ b/common/database/classes/database_drop_operator_family.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_owned.php b/common/database/classes/database_drop_owned.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_owned.php +++ b/common/database/classes/database_drop_owned.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_policy.php b/common/database/classes/database_drop_policy.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_policy.php +++ b/common/database/classes/database_drop_policy.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_publication.php b/common/database/classes/database_drop_publication.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_publication.php +++ b/common/database/classes/database_drop_publication.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_role.php b/common/database/classes/database_drop_role.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_role.php +++ b/common/database/classes/database_drop_role.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_rule.php b/common/database/classes/database_drop_rule.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_rule.php +++ b/common/database/classes/database_drop_rule.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_schema.php b/common/database/classes/database_drop_schema.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_schema.php +++ b/common/database/classes/database_drop_schema.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_sequence.php b/common/database/classes/database_drop_sequence.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_sequence.php +++ b/common/database/classes/database_drop_sequence.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_server.php b/common/database/classes/database_drop_server.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_server.php +++ b/common/database/classes/database_drop_server.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_statistics.php b/common/database/classes/database_drop_statistics.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_statistics.php +++ b/common/database/classes/database_drop_statistics.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_subscription.php b/common/database/classes/database_drop_subscription.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_subscription.php +++ b/common/database/classes/database_drop_subscription.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_table.php b/common/database/classes/database_drop_table.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_table.php +++ b/common/database/classes/database_drop_table.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_tablespace.php b/common/database/classes/database_drop_tablespace.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_tablespace.php +++ b/common/database/classes/database_drop_tablespace.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_text_search_configuration.php b/common/database/classes/database_drop_text_search_configuration.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_text_search_configuration.php +++ b/common/database/classes/database_drop_text_search_configuration.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_text_search_dictionary.php b/common/database/classes/database_drop_text_search_dictionary.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_text_search_dictionary.php +++ b/common/database/classes/database_drop_text_search_dictionary.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_text_search_parser.php b/common/database/classes/database_drop_text_search_parser.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_text_search_parser.php +++ b/common/database/classes/database_drop_text_search_parser.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_text_search_template.php b/common/database/classes/database_drop_text_search_template.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_text_search_template.php +++ b/common/database/classes/database_drop_text_search_template.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_transform.php b/common/database/classes/database_drop_transform.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_transform.php +++ b/common/database/classes/database_drop_transform.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_trigger.php b/common/database/classes/database_drop_trigger.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_trigger.php +++ b/common/database/classes/database_drop_trigger.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_type.php b/common/database/classes/database_drop_type.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_type.php +++ b/common/database/classes/database_drop_type.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_user.php b/common/database/classes/database_drop_user.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_user.php +++ b/common/database/classes/database_drop_user.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_user_mapping.php b/common/database/classes/database_drop_user_mapping.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_user_mapping.php +++ b/common/database/classes/database_drop_user_mapping.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_drop_view.php b/common/database/classes/database_drop_view.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_drop_view.php +++ b/common/database/classes/database_drop_view.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_end.php b/common/database/classes/database_end.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_end.php +++ b/common/database/classes/database_end.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_execute.php b/common/database/classes/database_execute.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_execute.php +++ b/common/database/classes/database_execute.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_explain.php b/common/database/classes/database_explain.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_explain.php +++ b/common/database/classes/database_explain.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_fetch.php b/common/database/classes/database_fetch.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_fetch.php +++ b/common/database/classes/database_fetch.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_grant.php b/common/database/classes/database_grant.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_grant.php +++ b/common/database/classes/database_grant.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_import_foreign_schema.php b/common/database/classes/database_import_foreign_schema.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_import_foreign_schema.php +++ b/common/database/classes/database_import_foreign_schema.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_insert.php b/common/database/classes/database_insert.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_insert.php +++ b/common/database/classes/database_insert.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_listen.php b/common/database/classes/database_listen.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_listen.php +++ b/common/database/classes/database_listen.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_load.php b/common/database/classes/database_load.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_load.php +++ b/common/database/classes/database_load.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_lock.php b/common/database/classes/database_lock.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_lock.php +++ b/common/database/classes/database_lock.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_member_object.php b/common/database/classes/database_member_object.php index cb7f836..00220c2 100644 --- a/common/database/classes/database_member_object.php +++ b/common/database/classes/database_member_object.php @@ -25,7 +25,7 @@ class c_database_member_object extends c_database_query { use t_database_action_parameter; use t_database_name; - protected const pr_QUERY_COMMAND = ''; + protected const p_QUERY_COMMAND = ''; /** @@ -220,7 +220,7 @@ class c_database_member_object extends c_database_query { return new c_base_return_false(); } - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; $this->value .= ' ' . $action; unset($action); diff --git a/common/database/classes/database_move.php b/common/database/classes/database_move.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_move.php +++ b/common/database/classes/database_move.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_notify.php b/common/database/classes/database_notify.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_notify.php +++ b/common/database/classes/database_notify.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_prepare.php b/common/database/classes/database_prepare.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_prepare.php +++ b/common/database/classes/database_prepare.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_prepare_transaction.php b/common/database/classes/database_prepare_transaction.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_prepare_transaction.php +++ b/common/database/classes/database_prepare_transaction.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_query.php b/common/database/classes/database_query.php index af2941f..82cae37 100644 --- a/common/database/classes/database_query.php +++ b/common/database/classes/database_query.php @@ -33,7 +33,7 @@ require_once('common/database/interfaces/database_query_parameter.php'); abstract class c_database_query extends c_base_return_string implements i_database_query { public const PARAMETER_NONE = 0; - protected const pr_QUERY_COMMAND = ''; + protected const p_QUERY_COMMAND = ''; protected $placeholders; @@ -217,7 +217,7 @@ abstract class c_database_query extends c_base_return_string implements i_databa * Implements do_build(). */ public function do_build() { - $this->value = static::pr_QUERY_COMMAND; + $this->value = static::p_QUERY_COMMAND; return new c_base_return_true(); } @@ -366,7 +366,7 @@ class c_database_argument_query extends c_base_return_string implements i_databa * Provide an SQL expression argument. */ class c_database_argument_expression extends c_base_return_string implements i_database_query_parameter { - protected const pr_QUERY_AS = 'as'; + protected const p_QUERY_AS = 'as'; protected $expression; protected $alias; @@ -520,7 +520,7 @@ class c_database_argument_expression extends c_base_return_string implements i_d $this->value = $this->expression; if (!is_string($this->alias)) { - $this->value .= ' ' . static::pr_QUERY_AS . ' ' . $this->alias; + $this->value .= ' ' . static::p_QUERY_AS . ' ' . $this->alias; } return new c_base_return_true(); diff --git a/common/database/classes/database_reassign_owned.php b/common/database/classes/database_reassign_owned.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_reassign_owned.php +++ b/common/database/classes/database_reassign_owned.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_refresh_materialized.php b/common/database/classes/database_refresh_materialized.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_refresh_materialized.php +++ b/common/database/classes/database_refresh_materialized.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_reindex.php b/common/database/classes/database_reindex.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_reindex.php +++ b/common/database/classes/database_reindex.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_release_savepoint.php b/common/database/classes/database_release_savepoint.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_release_savepoint.php +++ b/common/database/classes/database_release_savepoint.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_reset.php b/common/database/classes/database_reset.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_reset.php +++ b/common/database/classes/database_reset.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_revoke.php b/common/database/classes/database_revoke.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_revoke.php +++ b/common/database/classes/database_revoke.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_rollback.php b/common/database/classes/database_rollback.php index 39b2b89..cfba2a2 100644 --- a/common/database/classes/database_rollback.php +++ b/common/database/classes/database_rollback.php @@ -21,7 +21,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-rollback.html */ class c_database_rollback extends c_database_query { - protected const pr_QUERY_COMMAND = 'rollback'; + protected const p_QUERY_COMMAND = 'rollback'; /** * @see: t_base_return_value::p_s_new() diff --git a/common/database/classes/database_rollback_prepared.php b/common/database/classes/database_rollback_prepared.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_rollback_prepared.php +++ b/common/database/classes/database_rollback_prepared.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_rollback_to_savepoint.php b/common/database/classes/database_rollback_to_savepoint.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_rollback_to_savepoint.php +++ b/common/database/classes/database_rollback_to_savepoint.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_savepoint.php b/common/database/classes/database_savepoint.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_savepoint.php +++ b/common/database/classes/database_savepoint.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_security_label.php b/common/database/classes/database_security_label.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_security_label.php +++ b/common/database/classes/database_security_label.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_select.php b/common/database/classes/database_select.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_select.php +++ b/common/database/classes/database_select.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_select_into.php b/common/database/classes/database_select_into.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_select_into.php +++ b/common/database/classes/database_select_into.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_set.php b/common/database/classes/database_set.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_set.php +++ b/common/database/classes/database_set.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_set_constraints.php b/common/database/classes/database_set_constraints.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_set_constraints.php +++ b/common/database/classes/database_set_constraints.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_set_role.php b/common/database/classes/database_set_role.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_set_role.php +++ b/common/database/classes/database_set_role.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_set_session_authorization.php b/common/database/classes/database_set_session_authorization.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_set_session_authorization.php +++ b/common/database/classes/database_set_session_authorization.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_set_transaction.php b/common/database/classes/database_set_transaction.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_set_transaction.php +++ b/common/database/classes/database_set_transaction.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_show.php b/common/database/classes/database_show.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_show.php +++ b/common/database/classes/database_show.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_start_transaction.php b/common/database/classes/database_start_transaction.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_start_transaction.php +++ b/common/database/classes/database_start_transaction.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_string.php b/common/database/classes/database_string.php index b1dc6a0..4f0498d 100644 --- a/common/database/classes/database_string.php +++ b/common/database/classes/database_string.php @@ -26,10 +26,14 @@ class c_database_string { public const CREATE = 'create'; public const DELETE = 'delete'; public const DESCEND = 'desc'; + public const DISABLE_TRIGGER = 'disable trigger'; public const DOMAIN = 'domain'; public const DROP = 'drop'; public const DROP_CONSTRAINT = 'drop constraint'; public const DROP_DEFAULT = 'drop default'; + public const ENABLE_ALWAYS_TRIGGER = 'enable always trigger'; + public const ENABLE_REPLICA_TRIGGER = 'enable replica trigger'; + public const ENABLE_TRIGGER = 'enable trigger'; public const EVENT_TRIGGER = 'event trigger'; public const EXECUTE = 'execute'; public const FALSE = 'false'; @@ -101,6 +105,7 @@ class c_database_string { public const TO = 'to'; public const UPDATE = 'update'; public const USAGE = 'usage'; + public const USER = 'user'; public const USER_CURRENT = 'current_user'; public const USER_SESSION = 'session_user'; public const USING = 'using'; diff --git a/common/database/classes/database_truncate.php b/common/database/classes/database_truncate.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_truncate.php +++ b/common/database/classes/database_truncate.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_unlisten.php b/common/database/classes/database_unlisten.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_unlisten.php +++ b/common/database/classes/database_unlisten.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_update.php b/common/database/classes/database_update.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_update.php +++ b/common/database/classes/database_update.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_vacuum.php b/common/database/classes/database_vacuum.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_vacuum.php +++ b/common/database/classes/database_vacuum.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/classes/database_values.php b/common/database/classes/database_values.php index a2d73cf..bc3389e 100644 --- a/common/database/classes/database_values.php +++ b/common/database/classes/database_values.php @@ -19,7 +19,7 @@ require_once('common/database/classes/database_query.php'); * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html */ class c_database_alter_coalation extends c_database_query { - protected const pr_QUERY_COMMAND = 'alter coalation'; + protected const p_QUERY_COMMAND = 'alter coalation'; /** diff --git a/common/database/enumerations/database_constraint.php b/common/database/enumerations/database_constraint.php new file mode 100644 index 0000000..9094668 --- /dev/null +++ b/common/database/enumerations/database_constraint.php @@ -0,0 +1,18 @@ +constraint = NULL; + return new c_base_return_true(); + } + + if (!is_string($constraint_name)) { + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'constraint', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + + $constraint = [ + 'name' => $constraint_name, + 'type' => $type, + 'exists_or_invalid' => NULL, + 'cascade' => NULL, + ]; + + if ($type === e_database_constraint::ADD) { + if (!is_bool($exists_or_invalid)) { + unset($constraint); + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'exists_or_invalid', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + + $constraint['exists_or_invalid'] = $exists_or_invalid; + } + else if ($type === e_database_constraint::DROP) { + if (!is_bool($exists_or_invalid)) { + unset($constraint); + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'exists_or_invalid', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + + $constraint['exists_or_invalid'] = $exists_or_invalid; + } + else if ($type === e_database_constraint::VALIDATE) { + switch ($cascade) { + case e_database_cascade::CASCADE: + case e_database_cascade::RESTRICT: + $constraint['cascade'] = $cascade; + break; + default: + unset($constraint); + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'cascade', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + } + else { + unset($constraint); + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + + $this->constraint = $constraint; + unset($constraint); + return new c_base_return_true(); + } + + /** + * Get the currently assigned name. + * + * @return c_base_return_string|c_base_return_null + * A name on success. + * NULL is returned if not set (constraint is not to be used). + * NULL with the error bit set is returned on error. + */ + public function get_constraint_name() { + if (is_null($this->constraint)) { + return new c_base_return_null(); + } + + if (is_string($this->constraint['name'])) { + return c_base_return_string::s_new($this->constraint['name']); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'constraint[name]', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Get the currently assigned type. + * + * @return c_base_return_int|c_base_return_null + * A type code on success. + * NULL is returned if not set (constraint is not to be used). + * NULL with the error bit set is returned on error. + */ + public function get_constraint_type() { + if (is_null($this->constraint)) { + return new c_base_return_null(); + } + + if (is_int($this->constraint['type'])) { + return c_base_return_int::s_new($this->constraint['type']); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'constraint[type]', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Get the currently assigned exists or invalid setting. + * + * @return c_base_return_bool|c_base_return_null + * A boolean on success. + * NULL is returned if not set (constraint is not to be used). + * NULL with the error bit set is returned on error. + */ + public function get_constraint_exists_or_invalid() { + if (is_null($this->constraint) || is_null($this->constraint['exists_or_invalid'])) { + return new c_base_return_null(); + } + + if (is_bool($this->constraint['exists_or_invalid'])) { + return c_base_return_bool::s_new($this->constraint['exists_or_invalid']); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'constraint[exists_or_invalid]', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Get the currently assigned cascade setting. + * + * @return c_base_return_int|c_base_return_null + * A cascade code on success. + * NULL is returned if not set (constraint is not to be used). + * NULL with the error bit set is returned on error. + */ + public function get_constraint_cascade() { + if (is_null($this->constraint) || is_null($this->constraint['cascade'])) { + return new c_base_return_null(); + } + + if (is_int($this->constraint['cascade'])) { + return c_base_return_bool::s_new($this->constraint['cascade']); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'constraint[cascade]', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Perform the common build process for this trait. + * + * As an internal trait method, the caller is expected to perform any appropriate validation. + * + * @return string|null + * A string is returned on success. + * NULL is returned if there is nothing to process or there is an error. + */ + protected function p_do_build_constraint() { + if (is_null($this->constraint)) { + return NULL; + } + + $value = NULL; + if ($this->constraint['type'] === e_database_constraint::ADD) { + if (is_string($this->constraint['name'])) { + $value = c_database_string::ADD . ' ' . $this->constraint['name']; + + if ($this->constraint['exists_or_invalid']) { + $value .= ' ' . c_database_string::NOT_VALID; + } + } + } + else if ($this->constraint['type'] === e_database_constraint::DROP) { + if (is_string($this->constraint['name'])) { + $value = c_database_string::DROP_CONSTRAINT . ' ' . $this->constraint['name']; + } + } + else if ($this->constraint['type'] === e_database_constraint::VALIDATE) { + if (is_string($this->constraint['name'])) { + $value = c_database_string::VALIDATE_CONSTAINT; + + if ($this->constraint['exists_or_invalid']) { + $value .= ' ' . c_database_string::NOT_VALID; + } + + $value .=' ' . $this->constraint['name']; + + if ($this->constraint['cascade'] === e_database_cascade::CASCADE) { + $value .= ' ' . c_database_string::CASCADE; + } + else if ($this->constraint['cascade'] === e_database_cascade::RESTRICT) { + $value .= ' ' . c_database_string::RESTRICT; + } + } + } + + return $value; + } +} diff --git a/common/database/traits/database_enable_trigger.php b/common/database/traits/database_enable_trigger.php new file mode 100644 index 0000000..fc45741 --- /dev/null +++ b/common/database/traits/database_enable_trigger.php @@ -0,0 +1,208 @@ +enable_trigger = NULL; + return new c_base_return_true(); + } + + if (!is_bool($enable_trigger)) { + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'enable_trigger', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + + $use_name = NULL; + switch ($type) { + case e_database_enable_trigger::ALWAYS: + case e_database_enable_trigger::NAME: + case e_database_enable_trigger::REPLICA: + if (!is_string($name)) { + unset($use_name); + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + break; + case e_database_enable_trigger::ALL: + $use_name = c_database_string::ALL; + break; + case e_database_enable_trigger::USER: + $use_name = c_database_string::USER; + break; + default: + unset($use_name); + $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT); + return c_base_return_error::s_false($error); + } + + $this->enable_trigger = [ + 'status' => $enable_trigger, + 'type' => $type, + 'name' => $use_name, + ]; + unset($use_name); + + return new c_base_return_true(); + } + + /** + * Get the currently assigned ENABLE or DISABLE status. + * + * @return c_base_return_bool|c_base_return_null + * TRUE for ENABLE TRIGGER or FALSE for DISABLE TRIGGER on success. + * NULL is returned if not set (not to be confused with DISABLE TRIGGER). + * NULL with the error bit set is returned on error. + */ + public function get_enable_trigger_status() { + if (is_null($this->enable_trigger)) { + return new c_base_return_null(); + } + + if (is_bool($this->enable_trigger['status'])) { + return c_base_return_bool::s_new($this->enable_trigger['status']); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'enable_trigger[status]', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Get the currently assigned ENABLE or DISABLE type. + * + * @return c_base_return_int|c_base_return_null + * An integer representing the type code on success. + * NULL is returned if not set. + * NULL with the error bit set is returned on error. + */ + public function get_enable_trigger_type() { + if (is_null($this->enable_trigger)) { + return new c_base_return_null(); + } + + if (is_int($this->enable_trigger['type'])) { + return c_base_return_int::s_new($this->enable_trigger['type']); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'enable_trigger[type]', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Get the currently assigned ENABLE or DISABLE name. + * + * @return c_base_return_string|c_base_return_null + * An integer representing the type code on success. + * NULL is returned if not set. + * NULL with the error bit set is returned on error. + */ + public function get_enable_trigger_name() { + if (is_null($this->enable_trigger) || is_null($this->enable_trigger['name'])) { + return new c_base_return_null(); + } + + if (is_int($this->enable_trigger['name'])) { + return c_base_return_int::s_new($this->enable_trigger['name']); + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'enable_trigger[name]', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE); + return c_base_return_error::s_null($error); + } + + /** + * Perform the common build process for this trait. + * + * As an internal trait method, the caller is expected to perform any appropriate validation. + * + * @return string|null + * A string is returned on success. + * NULL is returned if there is nothing to process or there is an error. + */ + protected function p_do_build_enable_trigger() { + if (is_null($this->enable_trigger)) { + return NULL; + } + + $value = NULL; + switch ($this->enable_trigger['type']) { + case e_database_enable_trigger::ALWAYS: + case e_database_enable_trigger::REPLICA: + if (is_string($this->enable_trigger['name'])) { + if ($this->enable_trigger['type'] === e_database_enable_trigger::ALWAYS) { + $value = c_database_string::ENABLE_ALWAYS_TRIGGER . ' ' . $this->enable_trigger['name']; + } + else if ($this->enable_trigger['type'] === e_database_enable_trigger::REPLICA) { + $value = c_database_string::ENABLE_REPLICA_TRIGGER . ' ' . $this->enable_trigger['name']; + } + } + break; + + case e_database_enable_trigger::NAME: + if (is_string($this->enable_trigger['name'])) { + if ($this->enable_trigger['status']) { + $value = c_database_string::ENABLE_TRIGGER . ' ' . $this->enable_trigger['name']; + } + else { + $value = c_database_string::DISABLE_TRIGGER . ' ' . $this->enable_trigger['name']; + } + } + break; + case e_database_enable_trigger::ALL: + if ($this->enable_trigger['status']) { + $value = c_database_string::ENABLE_TRIGGER . ' ' . c_database_string::ALL; + } + else { + $value = c_database_string::DISABLE_TRIGGER . ' ' . c_database_string::ALL; + } + break; + case e_database_enable_trigger::USER: + if ($this->enable_trigger['status']) { + $value = c_database_string::ENABLE_TRIGGER . ' ' . c_database_string::USER; + } + else { + $value = c_database_string::DISABLE_TRIGGER . ' ' . c_database_string::USER; + } + break; + } + + return $value; + } +} diff --git a/common/database/traits/database_handler.php b/common/database/traits/database_handler.php index a155d3a..bfb7a29 100644 --- a/common/database/traits/database_handler.php +++ b/common/database/traits/database_handler.php @@ -41,7 +41,7 @@ trait t_database_handler { if ($handler === e_database_handler::HANDLER) { if (is_string($handler_function)) { - $this->handler[ + $this->handler = [ 'type' => $handler, 'name' => $handler_function, ]; @@ -53,7 +53,7 @@ trait t_database_handler { return c_base_return_error::s_false($error); } else if ($handler === e_database_handler::NO_HANDLER) { - $this->handler[ + $this->handler = [ 'type' => $handler, 'name' => null, ]; @@ -96,18 +96,19 @@ trait t_database_handler { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_handler() { - $value = NULL; + if (is_null($this->handler)) { + return NULL; + } - if (isset($this->handler['type'])) { - if ($this->handler['type'] == e_database_handler::HANDLER) { - if (isset($this->handler['name'])) { - $value = c_database_string::HANDLER . ' ' . $this->handler['name']; - } - } - else if ($this->handler['type'] == e_database_handler::NO_HANDLER) { - $value .= c_database_string::NO_HANDLER; + $value = NULL; + if ($this->handler['type'] == e_database_handler::HANDLER) { + if (isset($this->handler['name'])) { + $value = c_database_string::HANDLER . ' ' . $this->handler['name']; } } + else if ($this->handler['type'] == e_database_handler::NO_HANDLER) { + $value .= c_database_string::NO_HANDLER; + } return $value; } diff --git a/common/database/traits/database_in_schema.php b/common/database/traits/database_in_schema.php index 27420a9..f5927e5 100644 --- a/common/database/traits/database_in_schema.php +++ b/common/database/traits/database_in_schema.php @@ -110,6 +110,10 @@ trait t_database_in_schema { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_in_schema() { + if (is_null($this->in_schema)) { + return NULL; + } + return c_database_string::IN . ' ' . c_database_string::SCHEMA . ' ' . implode(', ', $this->in_schema); } } diff --git a/common/database/traits/database_inherit.php b/common/database/traits/database_inherit.php index 3ebdc18..fc1965f 100644 --- a/common/database/traits/database_inherit.php +++ b/common/database/traits/database_inherit.php @@ -104,6 +104,10 @@ trait t_database_inherit { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_inherit() { + if (is_null($this->inherit)) { + return NULL; + } + $value = $this->inherit['inherit'] ? c_database_string::INHERIT : c_database_string::NO_INHERIT; $value .= ' ' . $this->inherit['name']; return $value; diff --git a/common/database/traits/database_options.php b/common/database/traits/database_options.php index 7f91ea8..00c2c74 100644 --- a/common/database/traits/database_options.php +++ b/common/database/traits/database_options.php @@ -129,6 +129,10 @@ trait t_database_options { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_options() { + if (is_null($this->options)) { + return NULL; + } + $options = []; foreach ($this->options as $options_value) { if ($options_value['type'] == e_database_options::ADD) { diff --git a/common/database/traits/database_order_by.php b/common/database/traits/database_order_by.php index 80ee53e..9ef7404 100644 --- a/common/database/traits/database_order_by.php +++ b/common/database/traits/database_order_by.php @@ -78,6 +78,10 @@ trait t_database_order_by { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_order_by() { + if (is_null($this->order_by)) { + return NULL; + } + return c_database_string::ORDER_BY . ' ' . $this->order_by; } } diff --git a/common/database/traits/database_owner_to.php b/common/database/traits/database_owner_to.php index 794f284..6d2d12c 100644 --- a/common/database/traits/database_owner_to.php +++ b/common/database/traits/database_owner_to.php @@ -134,6 +134,10 @@ trait t_database_owner_to { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_owner_to() { + if (is_null($this->owner_to)) { + return NULL; + } + return c_database_string::OWNER_TO . ' ' . $this->owner_to['value']; } } diff --git a/common/database/traits/database_rename_column.php b/common/database/traits/database_rename_column.php index c21b0a7..90f2507 100644 --- a/common/database/traits/database_rename_column.php +++ b/common/database/traits/database_rename_column.php @@ -108,6 +108,10 @@ trait t_database_rename_column { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_rename_column() { + if (is_null($this->rename_column)) { + return NULL; + } + return c_database_string::RENAME_COLUMN . ' ' . $this->rename_column['from'] . ' ' . c_database_string::TO . $this->rename_column['to']; } } diff --git a/common/database/traits/database_rename_to.php b/common/database/traits/database_rename_to.php index 009baab..ebfc6fb 100644 --- a/common/database/traits/database_rename_to.php +++ b/common/database/traits/database_rename_to.php @@ -72,6 +72,10 @@ trait t_database_rename_to { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_rename_to() { + if (is_null($this->rename_to)) { + return NULL; + } + return c_database_string::RENAME_TO . ' ' . $this->rename_to; } } diff --git a/common/database/traits/database_reset.php b/common/database/traits/database_reset.php index 5b7f724..44b0004 100644 --- a/common/database/traits/database_reset.php +++ b/common/database/traits/database_reset.php @@ -125,8 +125,11 @@ trait t_database_reset { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_reset() { - $value = NULL; + if (is_null($this->reset)) { + return NULL; + } + $value = NULL; if ($this->reset['type'] === e_database_reset::PARAMETER) { if (is_string($this->reset['value'])) { $value = c_database_string::RESET . ' ' . $this->reset['value']; diff --git a/common/database/traits/database_set.php b/common/database/traits/database_set.php index 2e41d78..cb18579 100644 --- a/common/database/traits/database_set.php +++ b/common/database/traits/database_set.php @@ -155,8 +155,11 @@ trait t_database_set { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_set() { - $value = NULL; + if (is_null($this->set)) { + return NULL; + } + $value = NULL; if ($this->set['type'] === e_database_set::TO) { if (is_null($this->set['parameter'])) { $value = c_database_string::SET . ' ' . $this->set['parameter'] . ' ' . c_database_string::TO . ' ' . c_database_string::DEFAULT; diff --git a/common/database/traits/database_set_schema.php b/common/database/traits/database_set_schema.php index 52df467..bd99ec8 100644 --- a/common/database/traits/database_set_schema.php +++ b/common/database/traits/database_set_schema.php @@ -72,6 +72,10 @@ trait t_database_set_schema { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_set_schema() { + if (is_null($this->set_schema)) { + return NULL; + } + return c_database_string::SET_SCHEMA . ' ' . $this->set_schema; } } diff --git a/common/database/traits/database_set_tablespace.php b/common/database/traits/database_set_tablespace.php index 692911a..7246573 100644 --- a/common/database/traits/database_set_tablespace.php +++ b/common/database/traits/database_set_tablespace.php @@ -72,6 +72,10 @@ trait t_database_set_tablespace { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_set_tablespace() { + if (is_null($this->set_tablespace)) { + return NULL; + } + return c_database_string::SET_TABLESPACE . ' (' . $this->set_tablespace . ')'; } } diff --git a/common/database/traits/database_set_with_oids.php b/common/database/traits/database_set_with_oids.php index 29008c8..225f31b 100644 --- a/common/database/traits/database_set_with_oids.php +++ b/common/database/traits/database_set_with_oids.php @@ -77,6 +77,10 @@ trait t_database_set_with_oids { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_set_with_oids() { + if (is_null($this->set_with_oids)) { + return NULL; + } + return $this->set_with_oids ? c_database_string::SET_WITH_OIDS : c_database_string::SET_WITHOUT_OIDS; } } diff --git a/common/database/traits/database_validator.php b/common/database/traits/database_validator.php index 53b531a..823ec75 100644 --- a/common/database/traits/database_validator.php +++ b/common/database/traits/database_validator.php @@ -41,7 +41,7 @@ trait t_database_validator { if ($validator === e_database_validator::VALIDATOR) { if (is_string($validator_function)) { - $this->validator[ + $this->validator = [ 'type' => $validator, 'name' => $validator_function, ]; @@ -53,7 +53,7 @@ trait t_database_validator { return c_base_return_error::s_false($error); } else if ($validator === e_database_validator::NO_VALIDATOR) { - $this->validator[ + $this->validator = [ 'type' => $validator, 'name' => null, ]; @@ -96,18 +96,19 @@ trait t_database_validator { * NULL is returned if there is nothing to process or there is an error. */ protected function p_do_build_validator() { - $value = NULL; + if (is_null($this->validator)) { + return NULL; + } - if (is_array($this->validator) && isset($this->validator['type'])) { - if ($this->validator['type'] == e_database_validator::VALIDATOR) { - if (isset($this->validator['name'])) { - $value = c_database_string::VALIDATOR . ' ' . $this->validator['name']; - } - } - else if ($this->validator['type'] == e_database_validator::NO_VALIDATOR) { - $value = c_database_string::NO_VALIDATOR; + $value = NULL; + if ($this->validator['type'] == e_database_validator::VALIDATOR) { + if (isset($this->validator['name'])) { + $value = c_database_string::VALIDATOR . ' ' . $this->validator['name']; } } + else if ($this->validator['type'] == e_database_validator::NO_VALIDATOR) { + $value = c_database_string::NO_VALIDATOR; + } return $value; } -- 1.8.3.1