]> Kevux Git Server - koopa/commitdiff
Progress: continue development on database abstraction
authorKevin Day <thekevinday@gmail.com>
Wed, 5 Dec 2018 00:57:50 +0000 (18:57 -0600)
committerKevin Day <thekevinday@gmail.com>
Thu, 6 Dec 2018 04:45:02 +0000 (22:45 -0600)
192 files changed:
common/database/classes/database_alter_aggregate.php
common/database/classes/database_alter_coalation.php
common/database/classes/database_alter_conversion.php
common/database/classes/database_alter_database.php
common/database/classes/database_alter_default_privileges.php
common/database/classes/database_alter_domain.php
common/database/classes/database_alter_event_trigger.php
common/database/classes/database_alter_extension.php
common/database/classes/database_alter_foreign_data_wrapper.php
common/database/classes/database_alter_foreign_table.php
common/database/classes/database_alter_foreign_table_action.php [new file with mode: 0644]
common/database/classes/database_alter_function.php
common/database/classes/database_alter_group.php
common/database/classes/database_alter_index.php
common/database/classes/database_alter_language.php
common/database/classes/database_alter_large_object.php
common/database/classes/database_alter_materialized_view.php
common/database/classes/database_alter_operator.php
common/database/classes/database_alter_operator_class.php
common/database/classes/database_alter_operator_family.php
common/database/classes/database_alter_policy.php
common/database/classes/database_alter_publication.php
common/database/classes/database_alter_role.php
common/database/classes/database_alter_rule.php
common/database/classes/database_alter_schema.php
common/database/classes/database_alter_table.php
common/database/classes/database_alter_tablespace.php
common/database/classes/database_alter_text_search_configuration.php
common/database/classes/database_alter_text_search_dictionary.php
common/database/classes/database_alter_text_search_parser.php
common/database/classes/database_alter_text_search_template.php
common/database/classes/database_alter_trigger.php
common/database/classes/database_alter_type.php
common/database/classes/database_alter_user.php
common/database/classes/database_alter_user_mapping.php
common/database/classes/database_alter_view.php
common/database/classes/database_analyze.php
common/database/classes/database_begin.php
common/database/classes/database_checkpoint.php
common/database/classes/database_close.php
common/database/classes/database_cluster.php
common/database/classes/database_comment.php
common/database/classes/database_commit.php
common/database/classes/database_commit_prepared.php
common/database/classes/database_copy.php
common/database/classes/database_create_access_method.php
common/database/classes/database_create_aggregate.php
common/database/classes/database_create_cast.php
common/database/classes/database_create_collation.php
common/database/classes/database_create_conversion.php
common/database/classes/database_create_database.php
common/database/classes/database_create_domain.php
common/database/classes/database_create_event_trigger.php
common/database/classes/database_create_extension.php
common/database/classes/database_create_foreign.php
common/database/classes/database_create_foreign_data_wrapper.php
common/database/classes/database_create_function.php
common/database/classes/database_create_group.php
common/database/classes/database_create_index.php
common/database/classes/database_create_language.php
common/database/classes/database_create_materialized_view.php
common/database/classes/database_create_operator.php
common/database/classes/database_create_operator_class.php
common/database/classes/database_create_operator_family.php
common/database/classes/database_create_policy.php
common/database/classes/database_create_publication.php
common/database/classes/database_create_role.php
common/database/classes/database_create_rule.php
common/database/classes/database_create_schema.php
common/database/classes/database_create_sequence.php
common/database/classes/database_create_server.php
common/database/classes/database_create_statistics.php
common/database/classes/database_create_subscription.php
common/database/classes/database_create_table.php
common/database/classes/database_create_table_as.php
common/database/classes/database_create_tablespace.php
common/database/classes/database_create_text_search_configuration.php
common/database/classes/database_create_text_search_dictionary.php
common/database/classes/database_create_text_search_parser.php
common/database/classes/database_create_text_search_template.php
common/database/classes/database_create_transform.php
common/database/classes/database_create_trigger.php
common/database/classes/database_create_type.php
common/database/classes/database_create_user.php
common/database/classes/database_create_user_mapping.php
common/database/classes/database_create_view.php
common/database/classes/database_deallocate.php
common/database/classes/database_declare.php
common/database/classes/database_delete.php
common/database/classes/database_discard.php
common/database/classes/database_do.php
common/database/classes/database_drop_access_method.php
common/database/classes/database_drop_aggregate.php
common/database/classes/database_drop_cast.php
common/database/classes/database_drop_collation.php
common/database/classes/database_drop_conversion.php
common/database/classes/database_drop_database.php
common/database/classes/database_drop_domain.php
common/database/classes/database_drop_event_trigger.php
common/database/classes/database_drop_extension.php
common/database/classes/database_drop_foreign_data_wrapper.php
common/database/classes/database_drop_foreign_table.php
common/database/classes/database_drop_function.php
common/database/classes/database_drop_group.php
common/database/classes/database_drop_index.php
common/database/classes/database_drop_language.php
common/database/classes/database_drop_materialized_view.php
common/database/classes/database_drop_operator.php
common/database/classes/database_drop_operator_class.php
common/database/classes/database_drop_operator_family.php
common/database/classes/database_drop_owned.php
common/database/classes/database_drop_policy.php
common/database/classes/database_drop_publication.php
common/database/classes/database_drop_role.php
common/database/classes/database_drop_rule.php
common/database/classes/database_drop_schema.php
common/database/classes/database_drop_sequence.php
common/database/classes/database_drop_server.php
common/database/classes/database_drop_statistics.php
common/database/classes/database_drop_subscription.php
common/database/classes/database_drop_table.php
common/database/classes/database_drop_tablespace.php
common/database/classes/database_drop_text_search_configuration.php
common/database/classes/database_drop_text_search_dictionary.php
common/database/classes/database_drop_text_search_parser.php
common/database/classes/database_drop_text_search_template.php
common/database/classes/database_drop_transform.php
common/database/classes/database_drop_trigger.php
common/database/classes/database_drop_type.php
common/database/classes/database_drop_user.php
common/database/classes/database_drop_user_mapping.php
common/database/classes/database_drop_view.php
common/database/classes/database_end.php
common/database/classes/database_execute.php
common/database/classes/database_explain.php
common/database/classes/database_fetch.php
common/database/classes/database_grant.php
common/database/classes/database_import_foreign_schema.php
common/database/classes/database_insert.php
common/database/classes/database_listen.php
common/database/classes/database_load.php
common/database/classes/database_lock.php
common/database/classes/database_member_object.php
common/database/classes/database_move.php
common/database/classes/database_notify.php
common/database/classes/database_prepare.php
common/database/classes/database_prepare_transaction.php
common/database/classes/database_query.php
common/database/classes/database_reassign_owned.php
common/database/classes/database_refresh_materialized.php
common/database/classes/database_reindex.php
common/database/classes/database_release_savepoint.php
common/database/classes/database_reset.php
common/database/classes/database_revoke.php
common/database/classes/database_rollback.php
common/database/classes/database_rollback_prepared.php
common/database/classes/database_rollback_to_savepoint.php
common/database/classes/database_savepoint.php
common/database/classes/database_security_label.php
common/database/classes/database_select.php
common/database/classes/database_select_into.php
common/database/classes/database_set.php
common/database/classes/database_set_constraints.php
common/database/classes/database_set_role.php
common/database/classes/database_set_session_authorization.php
common/database/classes/database_set_transaction.php
common/database/classes/database_show.php
common/database/classes/database_start_transaction.php
common/database/classes/database_string.php
common/database/classes/database_truncate.php
common/database/classes/database_unlisten.php
common/database/classes/database_update.php
common/database/classes/database_vacuum.php
common/database/classes/database_values.php
common/database/enumerations/database_constraint.php [new file with mode: 0644]
common/database/enumerations/database_enable_trigger.php [new file with mode: 0644]
common/database/traits/database_constraint.php [new file with mode: 0644]
common/database/traits/database_enable_trigger.php [new file with mode: 0644]
common/database/traits/database_handler.php
common/database/traits/database_in_schema.php
common/database/traits/database_inherit.php
common/database/traits/database_options.php
common/database/traits/database_order_by.php
common/database/traits/database_owner_to.php
common/database/traits/database_rename_column.php
common/database/traits/database_rename_to.php
common/database/traits/database_reset.php
common/database/traits/database_set.php
common/database/traits/database_set_schema.php
common/database/traits/database_set_tablespace.php
common/database/traits/database_set_with_oids.php
common/database/traits/database_validator.php

index a08feb1ad013f05d747554c604ce6ff388e1489d..c40fa31797c6aaec8e9ab1152ffb03574cf24702 100644 (file)
@@ -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);
index 0058cb47380945d2629b6aab685d104a073c25fb..0673de4e2495b516d9bbf82c45ab649bec7600a6 100644 (file)
@@ -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);
index 28ee6e73b58b9b7bc3a05670e9474ade351f5d60..36084fd0575e6726533d923eb0339341604ac07c 100644 (file)
@@ -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);
index 3afd7668ed554914fdf256ce1746a46692901dea..4e8001bfaf5da7274f78ea596a631a507cdf3c3c 100644 (file)
@@ -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);
index 35a9808a0173053079821d3be47f40aecfc2423b..2978262f2b6c6615707c268d5d836c13ef9a3c41 100644 (file)
@@ -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);
index 3e5cfb3a277076ada19d03239e6e116d59d36aa4..0106a57b47b0447375469f5be6f2595b67b3f254 100644 (file)
@@ -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);
index 1cd5bcfa8624fd2a92048f289325fd5552a73ce5..9f5394a3fe12e20753451685bd1949879c281888 100644 (file)
@@ -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);
 
index 87fc0e52e32493ef60a74a93ed44e42144473224..6e297711c19f43d73a96741a62f6060d14386bc0 100644 (file)
@@ -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;
 
index 6470e307f7d2d9ccb3c2e09e6cf081e4eb6f86be..03df6185882d956719ae168191f2627ea2c632b3 100644 (file)
@@ -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);
index 7f5dd01953697d646fe51206c63c94b29fa7325f..052c001a24026231044028f478f726d0dca7e66d 100644 (file)
@@ -1,23 +1,20 @@
 <?php
 /**
  * @file
- * Provides a class for specific Postgesql query: ALTER COALATION.
+ * Provides a class for specific Postgesql query: ALTER FOREIGN TABLE.
  */
 namespace n_koopa;
 
 require_once('common/base/classes/base_error.php');
 require_once('common/base/classes/base_return.php');
 
+require_once('common/database/classes/database_alter_foeign_table_action.php');
 require_once('common/database/classes/database_query.php');
 
-require_once('common/database/traits/database_action.php');
 require_once('common/database/traits/database_name.php');
-require_once('common/database/traits/database_options.php');
-require_once('common/database/traits/database_owner_to.php');
 require_once('common/database/traits/database_rename_column.php');
 require_once('common/database/traits/database_rename_to.php');
 require_once('common/database/traits/database_set_schema.php');
-require_once('common/database/traits/database_set_with_oids.php');
 
 /**
  * The class for building and returning a Postgresql ALTER FOREIGN TABLE query string.
@@ -25,17 +22,14 @@ require_once('common/database/traits/database_set_with_oids.php');
  * @see: https://www.postgresql.org/docs/current/static/sql-alterforeigntable.html
  */
 class c_database_alter_foreign_table extends c_database_query {
-  use t_database_action;
   use t_database_name;
-  use t_database_options;
-  use t_database_owner_to;
   use t_database_rename_column;
   use t_database_rename_to;
   use t_database_set_schema;
-  use t_database_set_with_oids;
 
-  protected const pr_QUERY_COMMAND = 'alter foreign table';
+  protected const p_QUERY_COMMAND = 'alter foreign table';
 
+  protected $actions;
   protected $if_exists;
   protected $include_descendents; // The '*' following 'name'
   protected $only;
@@ -46,15 +40,12 @@ class c_database_alter_foreign_table extends c_database_query {
   public function __construct() {
     parent::__construct();
 
-    $this->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 (file)
index 0000000..e3b2d79
--- /dev/null
@@ -0,0 +1,139 @@
+<?php
+/**
+ * @file
+ * Provides a class for specific Postgesql query: ALTER FOREIGN TABLE action.
+ */
+namespace n_koopa;
+
+require_once('common/base/classes/base_error.php');
+require_once('common/base/classes/base_return.php');
+
+require_once('common/database/classes/database_query.php');
+
+require_once('common/database/traits/database_add_column.php');
+require_once('common/database/traits/database_alter_column.php');
+require_once('common/database/traits/database_constraint.php');
+require_once('common/database/traits/database_drop_column.php');
+require_once('common/database/traits/database_enable_trigger.php');
+require_once('common/database/traits/database_inherit.php');
+require_once('common/database/traits/database_options.php');
+require_once('common/database/traits/database_owner_to.php');
+require_once('common/database/traits/database_set_with_oids.php');
+
+/**
+ * The class for building and returning a Postgresql ALTER FOREIGN TABLE action query string.
+ *
+ * @see: https://www.postgresql.org/docs/current/static/sql-alterforeigntable.html
+ */
+class c_database_alter_foreign_table_action extends c_database_query {
+  use t_database_add_column;
+  use t_database_alter_column;
+  use t_database_constraint;
+  use t_database_drop_column;
+  use t_database_enable_trigger;
+  use t_database_inherit;
+  use t_database_options;
+  use t_database_owner_to;
+  use t_database_set_with_oids;
+
+  protected const p_QUERY_COMMAND = '';
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    parent::__construct();
+
+    $this->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();
+  }
+}
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index cb7f8367fedeadf2e53f902f45eb7859e0390b28..00220c2ec36c01cdbad239cafe0e193239bc6b35 100644 (file)
@@ -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);
 
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index af2941f828df91895607cc30058385085875b8a9..82cae3708dc5a97efc6528fba159a706665e312e 100644 (file)
@@ -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();
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index 39b2b89195a843f84b388496eb452d7e9597e92b..cfba2a2e61cf8c2efcc5cb7487593e22f7086327 100644 (file)
@@ -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()
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index b1dc6a0ec643cc1dc53053170ca745dce8330536..4f0498d9d79d632cc85654e6bd3f212da4a63411 100644 (file)
@@ -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';
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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';
 
 
   /**
index a2d73cfbf539d6ab77c7ccb50e33de9f24f97cad..bc3389e529fe58ca5a5268604a93c2c418a7fe69 100644 (file)
@@ -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 (file)
index 0000000..9094668
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @file
+ * Provides enumeration classes for managing codes used for generating specific Postgesql Queries.
+ *
+ * @see: https://www.postgresql.org/docs/current/static/sql-commands.html
+ */
+namespace n_koopa;
+
+/**
+ * Codes associated with database constaint.
+ */
+class e_database_constaint {
+  public const NONE     = 0;
+  public const ADD      = 1;
+  public const DROP     = 2;
+  public const VALIDATE = 3;
+}
diff --git a/common/database/enumerations/database_enable_trigger.php b/common/database/enumerations/database_enable_trigger.php
new file mode 100644 (file)
index 0000000..07004c7
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+/**
+ * @file
+ * Provides enumeration classes for managing codes used for generating specific Postgesql Queries.
+ *
+ * @see: https://www.postgresql.org/docs/current/static/sql-commands.html
+ */
+namespace n_koopa;
+
+/**
+ * Codes associated with postgresql enable/disable trigger information.
+ */
+class e_database_enable_trigger {
+  public const NONE    = 0;
+  public const ALL     = 1;
+  public const ALWAYS  = 2;
+  public const NAME    = 3;
+  public const REPLICA = 4;
+  public const USER    = 5;
+}
diff --git a/common/database/traits/database_constraint.php b/common/database/traits/database_constraint.php
new file mode 100644 (file)
index 0000000..a62eed5
--- /dev/null
@@ -0,0 +1,240 @@
+<?php
+/**
+ * @file
+ * Provides traits for specific Postgesql Queries.
+ *
+ * These traits are associated with actions.
+ *
+ * @see: https://www.postgresql.org/docs/current/static/sql-commands.html
+ */
+namespace n_koopa;
+
+require_once('common/base/classes/base_error.php');
+require_once('common/base/classes/base_return.php');
+
+require_once('common/database/classes/database_string.php');
+
+require_once('common/database/enumerations/database_cascade.php');
+require_once('common/database/enumerations/database_constraint.php');
+
+/**
+ * Provide the sql ADD/VALIDATE/DROP CONSTAINT functionality.
+ */
+trait t_database_constraint {
+  protected $constraint;
+
+  /**
+   * Set the ADD/VALIDATE/DROP CONSTRAINT settings.
+   *
+   * @param string|null $constraint_name
+   *   The name to use.
+   *   Set to NULL to disable.
+   * @param int|null $type
+   *   The type code representing the constaint operation.
+   *   This can only be NULL when $constraint_name is NULL.
+   * @param bool|null $exists_or_invalid
+   *   When $type is ADD, then this is a boolean such that NOT VALID is added when TRUE.
+   *   When $type is DROP, then this is a boolean such that IS EXISTS is added when TRUE.
+   *   Otherwise this should be NULL.
+   * @param int|null $cascade
+   *   When $type is DROP, this must be an integer representing CASCADE or RESTRICT.
+   *   Otherwise this should be NULL.
+   *
+   * @return c_base_return_status
+   *   TRUE on success, FALSE otherwise.
+   *   FALSE with the error bit set is returned on error.
+   */
+  public function set_constraint($constraint_name, $type = NULL, $exists_or_invalid = NULL, $cascade = NULL) {
+    if (is_null($constraint)) {
+      $this->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 (file)
index 0000000..fc45741
--- /dev/null
@@ -0,0 +1,208 @@
+<?php
+/**
+ * @file
+ * Provides traits for specific Postgesql Queries.
+ *
+ * These traits are associated with actions.
+ *
+ * @see: https://www.postgresql.org/docs/current/static/sql-commands.html
+ */
+namespace n_koopa;
+
+require_once('common/base/classes/base_error.php');
+require_once('common/base/classes/base_return.php');
+
+require_once('common/database/classes/database_string.php');
+
+require_once('common/database/enumerations/database_enable_trigger.php');
+
+/**
+ * Provide the sql SET WITH OIDS functionality.
+ */
+trait t_database_enable_trigger {
+  protected $enable_trigger;
+
+  /**
+   * Set the ENABLE TRIGGER or DISABLE TRIGGER value.
+   *
+   * @param bool|null $enable_trigger
+   *   Set to TRUE for ENABLE TRIGGER, FALSE for DISABLE TRIGGER.
+   *   Set to NULL to disable (as-in: no SQL is generated, do not confuse this with the generated DISABLE TRIGGER state produced by FALSE).
+   * @param int|null $type
+   *   An integer representing the type of the trigger.
+   *   Should only be NULL when $enable_trigger is NULL.
+   * @param string|null $name
+   *   A string representing the table name depending on the $type.
+   *   Use type NAME to explicitly require this.
+   *   Some types require this value, others ignore it.
+   *
+   * @return c_base_return_status
+   *   TRUE on success, FALSE otherwise.
+   *   FALSE with the error bit set is returned on error.
+   */
+  public function set_enable_trigger($enable, $type = NULL, $name = NULL) {
+    if (is_null($enable_trigger)) {
+      $this->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;
+  }
+}
index a155d3aa7b60cbc23e2bbfa6fa8b489317203f21..bfb7a2917f09d5d3580e387d8222907a404c3e00 100644 (file)
@@ -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;
   }
index 27420a9e94aed21467b39df27ebdadfc7f748f62..f5927e5b4fd0bee99966cddf88291d2be5d327cb 100644 (file)
@@ -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);
   }
 }
index 3ebdc18a42b16121aea40e6ffd37985b870d3a35..fc1965f7ae6800d3dec29e5695d63016a4a9cf53 100644 (file)
@@ -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;
index 7f91ea8083f6865cbee3885dda3fa4b798e7dc65..00c2c74f156d15d1d11d5cccbf16190b0d656c20 100644 (file)
@@ -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) {
index 80ee53ee248233f2ebe7526c37ea3e6e5ee38d87..9ef74045e5e6cd9f4374b40a3839cdcac1f14974 100644 (file)
@@ -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;
   }
 }
index 794f284521e92a74b211ca585c6ef8d5419b13c5..6d2d12c8a32d3d09f1b2093aff463f0e2e31654a 100644 (file)
@@ -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'];
   }
 }
index c21b0a76fbc633ad04f2119ed5d9920e25bf05fe..90f2507cb018823d248db3c08ef93b9553afb1a7 100644 (file)
@@ -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'];
   }
 }
index 009baabd7a891b95a6252757caa82147d0727192..ebfc6fbab1a21b18a566983f9d05bdce4c8d0f1b 100644 (file)
@@ -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;
   }
 }
index 5b7f7245008d74039b038f18b5cf4635d367f4d1..44b00043c6cd88bc9fcc08d943acd3546fc95841 100644 (file)
@@ -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'];
index 2e41d78e4c7ebab3d54d5df18c50c232fee7388a..cb185790ae23e0e855fd620ee6a61ddfc11506d6 100644 (file)
@@ -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;
index 52df4674dd8ff19d7d0b597d99d00c0dd4c36855..bd99ec87f5fb3a61a423874688512c1ffeb87350 100644 (file)
@@ -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;
   }
 }
index 692911ad00356805aaf01bb45e815fd9c1aa26f3..724657355e2cfe271c125bad7b71ccc4b5e894af 100644 (file)
@@ -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 . ')';
   }
 }
index 29008c841203a2b753ddc67b7040d93e1e85eb31..225f31b744d66fc00bb63fe06cb481d552375246 100644 (file)
@@ -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;
   }
 }
index 53b531acfc721ae0b887768e5490792079a654cb..823ec75589cb13ffb5a46fdc670331482cfb5de9 100644 (file)
@@ -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;
   }