]> Kevux Git Server - koopa/commitdiff
Progress: continue work on database
authorKevin Day <thekevinday@gmail.com>
Tue, 14 Aug 2018 04:30:28 +0000 (23:30 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 14 Aug 2018 04:32:48 +0000 (23:32 -0500)
Begin implementing query parameter class.
Move numeration classes into explicit numeration directory and update class names.
Continue refactoring database classes.

185 files changed:
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_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_code.php [deleted file]
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_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_parameter.php [new file with mode: 0644]
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_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_action.php [new file with mode: 0644]
common/database/enumerations/database_direction.php [new file with mode: 0644]
common/database/enumerations/database_on.php [new file with mode: 0644]
common/database/enumerations/database_option.php [new file with mode: 0644]
common/database/enumerations/database_privilege.php [new file with mode: 0644]
common/database/enumerations/database_property.php [new file with mode: 0644]
common/database/enumerations/database_reset.php [new file with mode: 0644]
common/database/enumerations/database_set.php [new file with mode: 0644]
common/database/enumerations/database_user.php [new file with mode: 0644]
common/database/traits/database_action.php
common/database/traits/database_group_by.php
common/database/traits/database_order_by.php
common/database/traits/database_owner_to.php
common/database/traits/database_reset.php
common/database/traits/database_set.php
common/standard/classes/standard_database.php

index 1f23293d27274999c129581fec9e56b02ea76877..888ddb4be6dffddf618b9453b5a59ae827f716ec 100644 (file)
@@ -8,6 +8,9 @@ namespace n_koopa;
 require_once('common/base/classes/base_error.php');
 require_once('common/base/classes/base_return.php');
 
+require_once('common/database/enumerations/database_reset.php');
+require_once('common/database/enumerations/database_set.php');
+
 require_once('common/database/classes/database_query.php');
 require_once('common/database/classes/database_string.php');
 
@@ -27,8 +30,8 @@ class c_database_alter_database extends c_database_query {
   use t_database_name;
   use t_database_rename_to;
   use t_database_owner_to;
-  use t_database_set_tablespace;
   use t_database_set;
+  use t_database_set_tablespace;
   use t_database_reset;
 
   protected const pr_QUERY_COMMAND = 'alter database';
@@ -44,8 +47,8 @@ class c_database_alter_database extends c_database_query {
     $this->query_name            = NULL;
     $this->query_rename_to       = NULL;
     $this->query_owner_to        = NULL;
-    $this->query_set_tablespace  = NULL;
     $this->query_set             = NULL;
+    $this->query_set_tablespace  = NULL;
     $this->query_set_parameter   = NULL;
     $this->query_set_value       = NULL;
     $this->query_reset           = NULL;
@@ -61,8 +64,8 @@ class c_database_alter_database extends c_database_query {
     unset($this->query_name);
     unset($this->query_rename_to);
     unset($this->query_owner_to);
-    unset($this->query_set_tablespace);
     unset($this->query_set);
+    unset($this->query_set_tablespace);
     unset($this->query_set_parameter);
     unset($this->query_set_value);
     unset($this->query_reset);
@@ -166,7 +169,7 @@ class c_database_alter_database extends c_database_query {
       $this->value .= ' ' . c_database_string::SET_TABLESPACE . ' (' . $this->query_set_tablespace . ')';
     }
     else if (is_int($this->query_set)) {
-      if ($this->query_set == c_database_code_set::TO) {
+      if ($this->query_set === e_database_set::TO) {
         if (is_null($this->query_set_parameter)) {
           $this->value .= ' ' . c_database_string::SET . ' ' . $this->query_set_parameter . ' ' . c_database_string::TO . ' ' . c_database_string::DEFAULT;
         }
@@ -174,7 +177,7 @@ class c_database_alter_database extends c_database_query {
           $this->value .= ' ' . c_database_string::SET . ' ' . $this->query_set_parameter . ' ' . c_database_string::TO . ' ' . $this->query_set_value;
         }
       }
-      else if ($this->query_set == c_database_code_set::EQUAL) {
+      else if ($this->query_set === e_database_set::EQUAL) {
         if (is_null($this->query_set_parameter)) {
           $this->value .= ' ' . c_database_string::SET . ' ' . $this->query_set_parameter . ' = ' . c_database_string::DEFAULT;
         }
@@ -182,19 +185,19 @@ class c_database_alter_database extends c_database_query {
           $this->value .= ' ' . c_database_string::SET . ' ' . $this->query_set_parameter . ' = ' . $this->query_set_value;
         }
       }
-      else if ($this->query_set == c_database_code_set::FROM_CURRENT) {
+      else if ($this->query_set == e_database_set::FROM_CURRENT) {
         if (is_string($this->query_set_parameter)) {
           $this->value .= ' ' . c_database_string::SET . ' ' . $this->query_set_parameter . ' = ' . c_database_string::FROM_CURRENT;
         }
       }
     }
     else if (is_string($this->query_reset)) {
-      if ($this->query_set == c_database_code_reset::PARAMETER) {
+      if ($this->query_set === e_database_reset::PARAMETER) {
         if (is_string($this->query_set_parameter)) {
           $this->value .= ' ' . c_database_string::RESET . ' ' . $this->query_set_parameter;
         }
       }
-      else if ($this->query_set == c_database_code_reset::ALL) {
+      else if ($this->query_set === e_database_reset::ALL) {
         $this->value .= ' ' . c_database_string::RESET . ' ' . c_database_string::ALL;
       }
     }
index 8261d6d22001ca693b3e4e78244496c245f2059a..c6c711ebf53a872deeeca2054adda2ab980815bb 100644 (file)
@@ -8,6 +8,11 @@ namespace n_koopa;
 require_once('common/base/classes/base_error.php');
 require_once('common/base/classes/base_return.php');
 
+require_once('common/database/enumerations/database_action.php');
+require_once('common/database/enumerations/database_on.php');
+require_once('common/database/enumerations/database_option.php');
+require_once('common/database/enumerations/database_privilege.php');
+
 require_once('common/database/classes/database_query.php');
 
 require_once('common/database/traits/database_in_schema.php');
@@ -24,34 +29,6 @@ class c_database_alter_default_priveleges extends c_database_query {
   use t_database_action;
   use t_database_option;
 
-  public const ACTION_NONE   = 0;
-  public const ACTION_GRANT  = 1;
-  public const ACTION_REVOKE = 2;
-
-  public const ON_NONE      = 0;
-  public const ON_TABLES_TO = 1;
-  public const ON_SEQUENCES = 2;
-  public const ON_FUNCTIONS = 3;
-  public const ON_TYPES     = 4;
-  public const ON_SCHEMAS   = 5;
-
-  public const PRIVILEGE_NONE       = 0;
-  public const PRIVILEGE_SELECT     = 1;
-  public const PRIVILEGE_INSERT     = 2;
-  public const PRIVILEGE_UPDATE     = 3;
-  public const PRIVILEGE_DELETE     = 4;
-  public const PRIVILEGE_TRUNCATE   = 5;
-  public const PRIVILEGE_REFERENCES = 6;
-  public const PRIVILEGE_TRIGGER    = 7;
-  public const PRIVILEGE_USAGE      = 8;
-  public const PRIVILEGE_EXECUTE    = 9;
-  public const PRIVILEGE_CREATE     = 10;
-  public const PRIVILEGE_ALL        = 11;
-
-  public const OPTION_NONE     = 0;
-  public const OPTION_CASCADE  = 1;
-  public const OPTION_RESTRICT = 2;
-
   protected const pr_QUERY_COMMAND = 'alter default privileges';
 
   protected $abbreviated;
@@ -198,11 +175,11 @@ class c_database_alter_default_priveleges extends c_database_query {
     }
 
     switch ($on) {
-      case static::ON_TABLES_TO:
-      case static::ON_SEQUENCES:
-      case static::ON_FUNCTIONS:
-      case static::ON_TYPES:
-      case static::ON_SCHEMAS:
+      case e_database_on::TABLES_TO:
+      case e_database_on::SEQUENCES:
+      case e_database_on::FUNCTIONS:
+      case e_database_on::TYPES:
+      case e_database_on::SCHEMAS:
         $this->on = $on;
         return new c_base_return_true();
       default:
@@ -456,8 +433,8 @@ class c_database_alter_default_priveleges extends c_database_query {
     }
 
     switch ($this->query_action) {
-        case static::ACTION_GRANT:
-        case static::ACTION_REVOKE:
+        case e_database_action::_GRANT:
+        case e_database_action::_REVOKE:
           break;
         default:
           return new c_base_return_false();
@@ -491,10 +468,10 @@ class c_database_alter_default_priveleges extends c_database_query {
       unset($names);
     }
 
-    if ($this->query_action === static::ACTION_GRANT) {
+    if ($this->query_action === e_database_action::ACTION_GRANT) {
       $this->value .= ' ' . c_database_string::GRANT;
     }
-    else if ($this->query_action === static::ACTION_REVOKE) {
+    else if ($this->query_action === e_database_action::ACTION_REVOKE) {
       $this->value .= ' ' . c_database_string::REVOKE;
 
       if ($this->option_grant) {
@@ -507,37 +484,37 @@ class c_database_alter_default_priveleges extends c_database_query {
     foreach ($this->privileges as $privilege) {
       $privileges .= ', ';
       switch ($privilege) {
-        case static::PRIVILEGE_SELECT:
+        case e_database_privilege::SELECT:
           $privileges .= c_database_string::SELECT;
           break;
-        case static::PRIVILEGE_INSERT:
+        case e_database_privilege::INSERT:
           $privileges .= c_database_string::INSERT;
           break;
-        case static::PRIVILEGE_UPDATE:
+        case e_database_privilege::UPDATE:
           $privileges .= c_database_string::UPDATE;
           break;
-        case static::PRIVILEGE_DELETE:
+        case e_database_privilege::DELETE:
           $privileges .= c_database_string::DELETE;
           break;
-        case static::PRIVILEGE_TRUNCATE:
+        case e_database_privilege::TRUNCATE:
           $privileges .= c_database_string::TRUNCATE;
           break;
-        case static::PRIVILEGE_REFERENCES:
+        case e_database_privilege::REFERENCES:
           $privileges .= c_database_string::REFERENCES;
           break;
-        case static::PRIVILEGE_TRIGGER:
+        case e_database_privilege::TRIGGER:
           $privileges .= c_database_string::TRIGGER;
           break;
-        case static::PRIVILEGE_USAGE:
+        case e_database_privilege::USAGE:
           $privileges .= c_database_string::USAGE;
           break;
-        case static::PRIVILEGE_EXECUTE:
+        case e_database_privilege::EXECUTE:
           $privileges .= c_database_string::EXECUTE;
           break;
-        case static::PRIVILEGE_CREATE:
+        case e_database_privilege::CREATE:
           $privileges .= c_database_string::CREATE;
           break;
-        case static::PRIVILEGE_ALL:
+        case e_database_privilege::ALL:
           $privileges .= c_database_string::ALL;
           break;
         default:
@@ -550,28 +527,28 @@ class c_database_alter_default_priveleges extends c_database_query {
 
     // ON ...
     switch($this->on) {
-      case static::ON_TABLES_TO:
+      case e_database_on::TABLES_TO:
         $this->value .= ' ' . c_database_string::ON_TABLES_TO;
         break;
-      case static::ON_SEQUENCES:
+      case e_database_on::SEQUENCES:
         $this->value .= ' ' . c_database_string::ON_SEQUENCES;
         break;
-      case static::ON_FUNCTIONS:
+      case e_database_on::FUNCTIONS:
         $this->value .= ' ' . c_database_string::ON_FUNCTIONS;
         break;
-      case static::ON_TYPES:
+      case e_database_on::TYPES:
         $this->value .= ' ' . c_database_string::ON_TYPES;
         break;
-      case static::ON_SCHEMAS:
+      case e_database_on::SCHEMAS:
         $this->value .= ' ' . c_database_string::ON_SCHEMAS;
         break;
     }
 
     // [ TO | FROM ] ... role names ...
-    if ($this->query_action === static::ACTION_GRANT) {
+    if ($this->query_action === e_database_action::GRANT) {
       $this->value .= ' ' . c_database_string::TO;
     }
-    else if ($this->query_action === static::ACTION_REVOKE) {
+    else if ($this->query_action === e_database_action::REVOKE) {
       $this->value .= ' ' . c_database_string::FROM;
     }
 
@@ -585,18 +562,18 @@ class c_database_alter_default_priveleges extends c_database_query {
     }
     unset($role_name);
 
-    if ($this->query_action === static::ACTION_GRANT) {
+    if ($this->query_action === e_database_action::GRANT) {
       // [ WITH GRANT OPTION ]
       if ($this->option_grant) {
         $this->value .= ' ' . c_database_string::WITH_GRANT_OPTION;
       }
     }
-    else if ($this->query_action === static::ACTION_REVOKE) {
+    else if ($this->query_action === e_database_action::REVOKE) {
       // [ CASCADE | RESTRICT ]
-      if ($this->query_option === static::OPTION_CASCADE) {
+      if ($this->query_option === e_database_option::CASCADE) {
         $this->value .= ' ' . c_database_string::CASCADE;
       }
-      else if ($this->query_option === static::OPTION_RESTRICT) {
+      else if ($this->query_option === e_database_option::RESTRICT) {
         $this->value .= ' ' . c_database_string::RESTRICT;
       }
     }
index 5d71104af8a4b9a1f7e13a80748af3fb640d5f48..73da8f742996458c7d04388180be46f30560f468 100644 (file)
@@ -8,9 +8,13 @@ namespace n_koopa;
 require_once('common/base/classes/base_error.php');
 require_once('common/base/classes/base_return.php');
 
+require_once('common/database/enumerations/database_action.php');
+require_once('common/database/enumerations/database_option.php');
+require_once('common/database/enumerations/database_property.php');
+
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER DOMAIN query string.
@@ -28,27 +32,6 @@ class c_database_alter_coalation extends c_database_query {
   use t_database_property;
   use t_database_option;
 
-  public const ACTION_NONE                = 0;
-  public const ACTION_ADD                 = 1;
-  public const ACTION_DROP                = 2;
-  public const ACTION_DROP_CONSTRAINT     = 3;
-  public const ACTION_DROP_DEFAULT        = 4;
-  public const ACTION_OWNER_TO            = 5;
-  public const ACTION_RENAME_CONSTRAINT   = 6;
-  public const ACTION_RENAME_TO           = 7;
-  public const ACTION_SET                 = 8;
-  public const ACTION_SET_DEFAULT         = 9;
-  public const ACTION_SET_SCHEMA          = 10;
-  public const ACTION_VALIDATE_CONSTRAINT = 11;
-
-  public const PROPERTY_NONE      = 0;
-  public const PROPERTY_NOT_VALID = 1;
-  public const PROPERTY_IF_EXISTS = 2;
-
-  public const OPTION_NONE     = 0;
-  public const OPTION_CASCADE  = 1;
-  public const OPTION_RESTRICT = 2;
-
   protected const pr_QUERY_COMMAND = 'alter domain';
 
   protected $expression;
@@ -246,7 +229,7 @@ class c_database_alter_coalation extends c_database_query {
 
     $action = NULL;
     switch ($this->query_action) {
-        case static::ACTION_ADD:
+        case e_database_action::ADD:
           if (!is_string($this->constraint)) {
             unset($action);
             return new c_base_return_false();
@@ -255,44 +238,44 @@ class c_database_alter_coalation extends c_database_query {
           $action = c_database_string::ADD;
           $action .= ' ' . $this->constraint;
 
-          if ($this->property === static::PROPERTY_NOT_VALID) {
+          if ($this->property === e_database_property::NOT_VALID) {
             $action .= ' ' . c_database_string::NOT_VALID;
           }
           break;
 
-        case static::ACTION_DROP:
+        case e_database_action::DROP:
           $action = c_database_string::DROP;
-          if ($this->property === static::PROPERTY_NOT_NULL) {
+          if ($this->property === e_database_property::NOT_NULL) {
             $action .= ' ' . c_database_string::NOT_NULL;
           }
           break;
 
-        case static::ACTION_DROP_CONSTRAINT:
+        case e_database_action::DROP_CONSTRAINT:
           if (!is_string($this->constraint)) {
             unset($action);
             return new c_base_return_false();
           }
 
           $action = c_database_string::DROP_CONSTRAINT;
-          if ($this->property === static::PROPERTY_IF_EXISTS) {
+          if ($this->property === e_database_property::IF_EXISTS) {
             $action .= ' ' . c_database_string::IF_EXISTS;
           }
 
           $action .= ' ' . $this->constraint;
 
-          if ($this->option === static::OPTION_RESTRICT) {
+          if ($this->option === e_database_option::RESTRICT) {
             $action .= ' ' . c_database_string::RESTRICT;
           }
-          else if ($this->option === static::OPTION_CASCADE) {
+          else if ($this->option === e_database_option::CASCADE) {
             $action .= ' ' . c_database_string::CASCADE;
           }
           break;
 
-        case static::ACTION_DROP_DEFAULT:
+        case e_database_action::DROP_DEFAULT:
           $action = c_database_string::DROP_DEFAULT;
           break;
 
-        case static::ACTION_OWNER_TO:
+        case e_database_action::OWNER_TO:
           if (!is_string($this->query_owner_to_user_name)) {
             unset($action);
             return new c_base_return_false();
@@ -301,7 +284,7 @@ class c_database_alter_coalation extends c_database_query {
           $action = c_database_string::OWNER_TO . ' (' . $this->query_owner_to_user_name . ')';
           break;
 
-        case static::ACTION_RENAME_CONSTRAINT:
+        case e_database_action::RENAME_CONSTRAINT:
           if (!is_string($this->constraint) || !is_string($this->constraint_new)) {
             unset($action);
             return new c_base_return_false();
@@ -310,7 +293,7 @@ class c_database_alter_coalation extends c_database_query {
           $action = c_database_string::RENAME_CONSTRAINT . ' ' . $this->constraint . ' ' . c_database_string::TO . ' ' . $this->constraint_new;
           break;
 
-        case static::ACTION_RENAME_TO:
+        case e_database_action::RENAME_TO:
           if (!is_string($this->query_rename_to)) {
             unset($action);
             return new c_base_return_false();
@@ -319,14 +302,14 @@ class c_database_alter_coalation extends c_database_query {
           $action = c_database_string::RENAME_TO . ' (' . $this->query_rename_to . ')';
           break;
 
-        case static::ACTION_SET:
+        case e_database_action::SET:
           $action = c_database_string::SET;
-          if ($this->property === static::PROPERTY_NOT_NULL) {
+          if ($this->property === e_database_property::NOT_NULL) {
             $action .= ' ' . c_database_string::NOT_NULL;
           }
           break;
 
-        case static::ACTION_SET_DEFAULT:
+        case e_database_action::SET_DEFAULT:
           if (!is_string($this->expression)) {
             unset($action);
             return new c_base_return_false();
@@ -335,7 +318,7 @@ class c_database_alter_coalation extends c_database_query {
           $action = c_database_string::SET_DEFAULT . ' ' . $this->expression;
           break;
 
-        case static::ACTION_SET_SCHEMA:
+        case e_database_action::SET_SCHEMA:
           if (!is_string($this->query_set_schema)) {
             unset($action);
             return new c_base_return_false();
@@ -344,7 +327,7 @@ class c_database_alter_coalation extends c_database_query {
           $action = ' ' . c_database_string::SET_SCHEMA . ' (' . $this->query_set_schema . ')';
           break;
 
-        case static::ACTION_VALIDATE_CONSTRAINT:
+        case e_database_action::VALIDATE_CONSTRAINT:
           if (!is_string($this->constraint)) {
             unset($action);
             return new c_base_return_false();
index 98f4f0e4545f71733835a52c5c4a745697e49e86..aa3d720a064baab3d13c1a001ff39eb9004b8010 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER EVENT TRIGGER query string.
@@ -20,6 +20,12 @@ require_once('common/base/traits/base_query.php');
  * @see: https://www.postgresql.org/docs/current/static/sql-alteraggregate.html
  */
 class c_database_alter_coalation extends c_database_query {
+  use t_database_action;
+  use t_database_action_property;
+  use t_database_name;
+  use t_database_owner_to;
+  use t_database_rename_to;
+
   protected const pr_QUERY_COMMAND = 'alter event trigger';
 
 
@@ -28,12 +34,24 @@ class c_database_alter_coalation extends c_database_query {
    */
   public function __construct() {
     parent::__construct();
+
+    $this->query_action          = NULL;
+    $this->query_action_property = NULL;
+    $this->query_name            = NULL;
+    $this->query_owner_to        = NULL;
+    $this->query_rename_to       = NULL;
   }
 
   /**
    * Class destructor.
    */
   public function __destruct() {
+    unset($this->query_action);
+    unset($this->query_action_property);
+    unset($this->query_name);
+    unset($this->query_owner_to);
+    unset($this->query_rename_to);
+
     parent::__destruct();
   }
 
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
diff --git a/common/database/classes/database_code.php b/common/database/classes/database_code.php
deleted file mode 100644 (file)
index f862448..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * @file
- * Provides 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 user/session information.
- */
-class c_database_code_user {
-  public const NONE    = 0;
-  public const CURRENT = 1;
-  public const SESSION = 2;
-  public const NAME    = 3;
-}
-
-/**
- * Codes associated with GROUP BY, ORDER BY, and related queries.
- */
-class c_database_code_direction {
-  public const NONE    = 0;
-  public const ASCEND  = 1;
-  public const DESCEND = 2;
-}
-
-/**
- * Codes associated with SET and related queries.
- */
-class c_database_code_set {
-  public const NONE         = 0;
-  public const TO           = 1;
-  public const EQUAL        = 2;
-  public const FROM_CURRENT = 3;
-}
-
-/**
- * Codes associated with RESET and related queries.
- */
-class c_database_code_reset {
-  public const NONE      = 0;
-  public const ALL       = 1;
-  public const PARAMETER = 2;
-}
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
diff --git a/common/database/classes/database_query_parameter.php b/common/database/classes/database_query_parameter.php
new file mode 100644 (file)
index 0000000..6603dcd
--- /dev/null
@@ -0,0 +1,559 @@
+<?php
+/**
+ * @file
+ * Provides classes for specific Postgesql Queries Parameter support.
+ *
+ * @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');
+
+/**
+ * An interface used to represent a Postgresql query parameter.
+ *
+ * The query parameter represents a placeholder to the assigned value (via the implementation of some specific subclass of c_base_return_value).
+ * The placeholder is intended to be inserted into the query string so that something like PHP's PDO can safely convert the placeholder to a given value.
+ * This does not store a placeholder name itself as the class itself represents that it is a placeholder.
+ *
+ * @see: c_base_return_value
+ */
+interface i_database_query_parameter {
+
+  /**
+   * @see: c_base_return_value::p_s_new()
+   */
+  public static function s_new($value);
+
+  /**
+   * @see: c_base_return_value::p_s_value()
+   */
+  public static function s_value($return);
+
+  /**
+   * @see: c_base_return_value::s_value_exact()
+   */
+  public static function s_value_exact($return);
+
+  /**
+   * @see: c_base_return_value::set_value()
+   */
+  public function set_value($value);
+
+  /**
+   * @see: c_base_return_value::get_value()
+   */
+  public function get_value();
+
+  /**
+   * @see: c_base_return_value::get_value_exact()
+   */
+  public function get_value_exact();
+}
+
+/**
+ * A query parameter representing a boolean.
+ *
+ * @see: c_base_return_bool
+ */
+class c_database_query_parameter_bool extends c_base_return_bool implements i_database_query_parameter {
+
+  /**
+   * @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__, FALSE);
+  }
+}
+
+/**
+ * A query parameter representing a string.
+ *
+ * @see: c_base_return_string
+ */
+class c_database_query_parameter_string extends c_base_return_string implements i_database_query_parameter {
+
+  /**
+   * @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__, '');
+  }
+}
+
+/**
+ * A query parameter representing a integer.
+ *
+ * @see: c_base_return_int
+ */
+class c_database_query_parameter_int extends c_base_return_int implements i_database_query_parameter {
+
+  /**
+   * @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__, 0);
+  }
+}
+
+/**
+ * A query parameter representing a float.
+ *
+ * @see: c_base_return_float
+ */
+class c_database_query_parameter_float extends c_base_return_value implements i_database_query_parameter {
+
+  /**
+   * @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__, 0.0);
+  }
+}
+
+/**
+ * A query parameter representing a json array, stored in this object as an array.
+ *
+ * @see: c_base_return_array
+ */
+class c_database_query_parameter_json extends c_base_return_array implements i_database_query_parameter {
+
+  /**
+   * @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__, []);
+  }
+
+  /**
+   * Assign the value.
+   *
+   * @param array $value
+   *   Any value so long as it is an array.
+   *   NULL is not allowed.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   FALSE is returned if any value in the array is not of type i_base_query_parameter.
+   */
+  public function set_value($value) {
+    if (!is_array($value)) {
+      return FALSE;
+    }
+
+    // guarantee that only i_base_query_parameter are assigend in the array.
+    foreach ($value as $v) {
+      if (!($v instanceof i_base_query_parameter)) {
+        unset($v);
+        return FALSE;
+      }
+    }
+    unset($v);
+
+    $this->value = $value;
+    return TRUE;
+  }
+
+  /**
+   * Assign the value at a specific index in the array.
+   *
+   * @param i_base_query_parameter $value
+   *   Any i_base_query_parameter implementation to be assigned at the specified position in the array.
+   * @param int|string $key
+   *   A key to assign a specific value to.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   FALSE is returned if value is not of type i_base_query_parameter.
+   */
+  public function set_value_at($value, $key) {
+    if (!($value instanceof i_base_query_parameter)) {
+      return FALSE;
+    }
+
+    return parent::set_value_at($value, $key);
+  }
+
+  /**
+   * Append the value at the end of the array.
+   *
+   * @param i_base_query_parameter $value
+   *   Any i_base_query_parameter to be appended in the array.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   FALSE is returned if value is not of type i_base_query_parameter.
+   */
+  public function set_value_append($value) {
+    if (!($value instanceof i_base_query_parameter)) {
+      return FALSE;
+    }
+
+    return parent::set_value_append($value);
+  }
+
+  /**
+   * Assigns the array from a serialized array string.
+   *
+   * @param string $serialized
+   *  A serialized string to convert to an array.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   if converted string does not produce an array, FALSE is returned and value is set to an empty array.
+   *   FALSE is returned if any value in the array is not of type i_base_query_parameter.
+   *
+   * @see: unserialize()
+   */
+  public function set_value_serialized($serialized) {
+    if (!is_string($serialized)) {
+      return FALSE;
+    }
+
+    $unserialized = unserialize($serialized);
+    if (is_array($unserialized)) {
+      // guarantee that only i_base_query_parameter are assigend in the array.
+      foreach ($unserialized as $v) {
+        if (!($v instanceof i_base_query_parameter)) {
+          unset($v);
+          return FALSE;
+        }
+      }
+      unset($v);
+
+      $this->value = $unserialized;
+      unset($unserialized);
+
+      return TRUE;
+    }
+    unset($unserialized);
+
+    $this->value = [];
+    return FALSE;
+  }
+
+  /**
+   * Returns the data as a json-serialized array string.
+   *
+   * @param string $jsonized
+   *  A jsonized string to convert to an array.
+   * @param bool $associative
+   *   (optional) When TRUE array is return as an associative array.
+   * @param int $options
+   *   (optional) bitmask of json constants.
+   * @param int $depth
+   *   (optional) Maximum array depth.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   if converted string does not produce an array, FALSE is returned and value is set to an empty array.
+   *   FALSE is returned if any value in the array is not of type i_base_query_parameter.
+   *
+   * @see: json_decode()
+   */
+  public function set_value_jsonized($jsonized, $associative = TRUE, $options = 0, $depth = 512) {
+    if (!is_string($jsonized)) {
+      return FALSE;
+    }
+
+    if (!is_bool($associative)) {
+      $associative = TRUE;
+    }
+
+    if (!is_int($options)) {
+      $options = 0;
+    }
+
+    if (!is_int($depth) || $depth < 1) {
+      $depth = 512;
+    }
+
+    $decoded = json_decode($jsonized, $associative, $options, $depth);
+    if (is_array($decoded)) {
+      // guarantee that only i_base_query_parameter are assigend in the array.
+      foreach ($unserialized as $v) {
+        if (!($v instanceof i_base_query_parameter)) {
+          unset($v);
+          return FALSE;
+        }
+      }
+      unset($v);
+
+      $this->value = $decoded;
+      unset($decoded);
+
+      return TRUE;
+    }
+    unset($decoded);
+
+    $this->value = [];
+    return FALSE;
+  }
+}
+
+/**
+ * A query parameter representing an array of query parameters, stored in this object as an array.
+ *
+ * All array values must be an implementation of type i_database_query_parameter.
+ *
+ * @see: c_base_return_array
+ */
+class c_database_query_parameter_set extends c_base_return_array implements i_database_query_parameter {
+
+  /**
+   * @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__, []);
+  }
+
+  /**
+   * Assign the value.
+   *
+   * @param array $value
+   *   Any value so long as it is an array.
+   *   NULL is not allowed.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   FALSE is returned if any value in the array is not of type i_base_query_parameter.
+   */
+  public function set_value($value) {
+    if (!is_array($value)) {
+      return FALSE;
+    }
+
+    // guarantee that only i_base_query_parameter are assigend in the array.
+    foreach ($value as $v) {
+      if (!($v instanceof i_base_query_parameter)) {
+        unset($v);
+        return FALSE;
+      }
+    }
+    unset($v);
+
+    $this->value = $value;
+    return TRUE;
+  }
+
+  /**
+   * Assign the value at a specific index in the array.
+   *
+   * @param i_base_query_parameter $value
+   *   Any i_base_query_parameter implementation to be assigned at the specified position in the array.
+   * @param int|string $key
+   *   A key to assign a specific value to.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   FALSE is returned if value is not of type i_base_query_parameter.
+   */
+  public function set_value_at($value, $key) {
+    if (!($value instanceof i_base_query_parameter)) {
+      return FALSE;
+    }
+
+    return parent::set_value_at($value, $key);
+  }
+
+  /**
+   * Append the value at the end of the array.
+   *
+   * @param i_base_query_parameter $value
+   *   Any i_base_query_parameter to be appended in the array.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   FALSE is returned if value is not of type i_base_query_parameter.
+   */
+  public function set_value_append($value) {
+    if (!($value instanceof i_base_query_parameter)) {
+      return FALSE;
+    }
+
+    return parent::set_value_append($value);
+  }
+
+  /**
+   * Assigns the array from a serialized array string.
+   *
+   * @param string $serialized
+   *  A serialized string to convert to an array.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   if converted string does not produce an array, FALSE is returned and value is set to an empty array.
+   *   FALSE is returned if any value in the array is not of type i_base_query_parameter.
+   *
+   * @see: unserialize()
+   */
+  public function set_value_serialized($serialized) {
+    if (!is_string($serialized)) {
+      return FALSE;
+    }
+
+    $unserialized = unserialize($serialized);
+    if (is_array($unserialized)) {
+      // guarantee that only i_base_query_parameter are assigend in the array.
+      foreach ($unserialized as $v) {
+        if (!($v instanceof i_base_query_parameter)) {
+          unset($v);
+          return FALSE;
+        }
+      }
+      unset($v);
+
+      $this->value = $unserialized;
+      unset($unserialized);
+
+      return TRUE;
+    }
+    unset($unserialized);
+
+    $this->value = [];
+    return FALSE;
+  }
+
+  /**
+   * Returns the data as a json-serialized array string.
+   *
+   * @param string $jsonized
+   *  A jsonized string to convert to an array.
+   * @param bool $associative
+   *   (optional) When TRUE array is return as an associative array.
+   * @param int $options
+   *   (optional) bitmask of json constants.
+   * @param int $depth
+   *   (optional) Maximum array depth.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   *   if converted string does not produce an array, FALSE is returned and value is set to an empty array.
+   *   FALSE is returned if any value in the array is not of type i_base_query_parameter.
+   *
+   * @see: json_decode()
+   */
+  public function set_value_jsonized($jsonized, $associative = TRUE, $options = 0, $depth = 512) {
+    if (!is_string($jsonized)) {
+      return FALSE;
+    }
+
+    if (!is_bool($associative)) {
+      $associative = TRUE;
+    }
+
+    if (!is_int($options)) {
+      $options = 0;
+    }
+
+    if (!is_int($depth) || $depth < 1) {
+      $depth = 512;
+    }
+
+    $decoded = json_decode($jsonized, $associative, $options, $depth);
+    if (is_array($decoded)) {
+      // guarantee that only i_base_query_parameter are assigend in the array.
+      foreach ($unserialized as $v) {
+        if (!($v instanceof i_base_query_parameter)) {
+          unset($v);
+          return FALSE;
+        }
+      }
+      unset($v);
+
+      $this->value = $decoded;
+      unset($decoded);
+
+      return TRUE;
+    }
+    unset($decoded);
+
+    $this->value = [];
+    return FALSE;
+  }
+}
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 7cd92a5d12e624f18a1c07d382de0511a6f49cbc..2aa118c37bdd51ecdc680ab6144c7366c1cfc259 100644 (file)
@@ -12,7 +12,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ROLLBACK query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
index 92ac008b384fd49c8d195e93dec340714e593d87..4fe2fc81b0f186073524451710b712611313875f 100644 (file)
@@ -10,7 +10,7 @@ require_once('common/base/classes/base_return.php');
 
 require_once('common/database/classes/database_query.php');
 
-require_once('common/base/traits/base_query.php');
+require_once('common/database/traits/database_query.php');
 
 /**
  * The class for building and returning a Postgresql ALTER COALATION query string.
diff --git a/common/database/enumerations/database_action.php b/common/database/enumerations/database_action.php
new file mode 100644 (file)
index 0000000..5868fcd
--- /dev/null
@@ -0,0 +1,29 @@
+<?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 actions.
+ */
+class e_database_action {
+  public const NONE                = 0;
+  public const ADD                 = 1;
+  public const DISABLE             = 2;
+  public const DROP                = 3;
+  public const DROP_CONSTRAINT     = 4;
+  public const DROP_DEFAULT        = 5;
+  public const ENABLE              = 6;
+  public const GRANT               = 7;
+  public const OWNER_TO            = 8;
+  public const RENAME_CONSTRAINT   = 9;
+  public const RENAME_TO           = 10;
+  public const SET                 = 11;
+  public const SET_DEFAULT         = 12;
+  public const SET_SCHEMA          = 13;
+  public const VALIDATE_CONSTRAINT = 14;
+}
diff --git a/common/database/enumerations/database_direction.php b/common/database/enumerations/database_direction.php
new file mode 100644 (file)
index 0000000..cc2e00e
--- /dev/null
@@ -0,0 +1,17 @@
+<?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 GROUP BY, ORDER BY, and related queries.
+ */
+class e_database_direction {
+  public const NONE    = 0;
+  public const ASCEND  = 1;
+  public const DESCEND = 2;
+}
diff --git a/common/database/enumerations/database_on.php b/common/database/enumerations/database_on.php
new file mode 100644 (file)
index 0000000..7886b1e
--- /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 database options.
+ */
+class e_database_on {
+  public const NONE      = 0;
+  public const TABLES_TO = 1;
+  public const SEQUENCES = 2;
+  public const FUNCTIONS = 3;
+  public const TYPES     = 4;
+  public const SCHEMAS   = 5;
+}
diff --git a/common/database/enumerations/database_option.php b/common/database/enumerations/database_option.php
new file mode 100644 (file)
index 0000000..0d3959d
--- /dev/null
@@ -0,0 +1,17 @@
+<?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 options.
+ */
+class e_database_option {
+  public const NONE     = 0;
+  public const CASCADE  = 1;
+  public const RESTRICT = 2;
+}
diff --git a/common/database/enumerations/database_privilege.php b/common/database/enumerations/database_privilege.php
new file mode 100644 (file)
index 0000000..6d68c5e
--- /dev/null
@@ -0,0 +1,26 @@
+<?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 privileges.
+ */
+class e_database_privilege {
+  public const NONE       = 0;
+  public const ALL        = 1;
+  public const CREATE     = 2;
+  public const DELETE     = 3;
+  public const EXECUTE    = 4;
+  public const INSERT     = 5;
+  public const REFERENCES = 6;
+  public const SELECT     = 7;
+  public const TRIGGER    = 8;
+  public const TRUNCATE   = 9;
+  public const UPDATE     = 10;
+  public const USAGE      = 11;
+}
diff --git a/common/database/enumerations/database_property.php b/common/database/enumerations/database_property.php
new file mode 100644 (file)
index 0000000..7eed3d5
--- /dev/null
@@ -0,0 +1,19 @@
+<?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 property.
+ */
+class e_database_property {
+  public const NONE      = 0;
+  public const ALWAYS    = 1;
+  public const IF_EXISTS = 2;
+  public const NOT_VALID = 3;
+  public const REPLICA   = 4;
+}
diff --git a/common/database/enumerations/database_reset.php b/common/database/enumerations/database_reset.php
new file mode 100644 (file)
index 0000000..fa49264
--- /dev/null
@@ -0,0 +1,17 @@
+<?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 RESET and related queries.
+ */
+class e_database_reset {
+  public const NONE      = 0;
+  public const ALL       = 1;
+  public const PARAMETER = 2;
+}
diff --git a/common/database/enumerations/database_set.php b/common/database/enumerations/database_set.php
new file mode 100644 (file)
index 0000000..a40ea73
--- /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 SET and related queries.
+ */
+class e_database_set {
+  public const NONE         = 0;
+  public const TO           = 1;
+  public const EQUAL        = 2;
+  public const FROM_CURRENT = 3;
+}
diff --git a/common/database/enumerations/database_user.php b/common/database/enumerations/database_user.php
new file mode 100644 (file)
index 0000000..71f4d82
--- /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 postgresql user/session information.
+ */
+class e_database_user {
+  public const NONE    = 0;
+  public const CURRENT = 1;
+  public const SESSION = 2;
+  public const NAME    = 3;
+}
index bfa6ecf238b07cad56921a57c1aeb5695c9a2a0b..8bdef5cb0da49e3e8276ed2937a0277460773cd5 100644 (file)
@@ -65,9 +65,9 @@ trait t_database_action {
 }
 
 /**
- * Provide property support for an SQL query.
+ * Provide action property support for an SQL query.
  *
- * A single property that is associated with a particular class-specific property such as SELECT, INSERT, etc...
+ * A single property that is associated with a particular action.
  */
 trait t_database_action_property {
   protected $query_action_property;
@@ -76,7 +76,7 @@ trait t_database_action_property {
    * Assigns this query action property.
    *
    * @param int|null $property
-   *   Whether or not to use a property associated with a particular class-specific action such as SELECT, INSERT, etc...
+   *   Whether or not to use a action property associated.
    *   Set to NULL to disable.
    *
    * @return c_base_return_status
@@ -106,7 +106,7 @@ trait t_database_action_property {
    *   NULL is returned if undefined.
    *   FALSE with error bit set is returned on error.
    */
-  protected function get_action_property() {
+  protected function get_query_action_property() {
     if (is_null($this->query_action_property)) {
       return new c_base_return_null();
     }
index 0aad14d461b2b0e222cd767ff7c9eebddb5738dd..ab720e503c609f20fdf31670073a5ede42100de3 100644 (file)
@@ -19,7 +19,7 @@ trait t_database_group_by {
   protected $query_group_by;
 
   /**
-   * Set the RENAME TO settings.
+   * Set the GROUP BY settings.
    *
    * @param string|null $group_by
    *   The name to rename to.
@@ -45,11 +45,11 @@ trait t_database_group_by {
   }
 
   /**
-   * Get the currently assigned name to rename to.
+   * Get the currently assigned name to group by.
    *
    * @return c_base_return_string|c_base_return_null
    *   A name on success.
-   *   NULL is returned if not set (rename to is not to be used).
+   *   NULL is returned if not set (group by is not to be used).
    *   NULL with the error bit set is returned on error.
    */
   public function get_query_group_by() {
index 5798fe80a0628c691c346fe29adef76d42151520..0176a09188a9cdcf076c0171ac7367934d3bf3b4 100644 (file)
@@ -45,11 +45,11 @@ trait t_database_order_by {
   }
 
   /**
-   * Get the currently assigned name to rename to.
+   * Get the currently assigned name to order by.
    *
    * @return c_base_return_string|c_base_return_null
    *   A name on success.
-   *   NULL is returned if not set (rename to is not to be used).
+   *   NULL is returned if not set (order by to is not to be used).
    *   NULL with the error bit set is returned on error.
    */
   public function get_query_order_by() {
index 4b343c2a7b0c96d025f4bc1d687311be23c859f3..6162f3fde994e7961bc7e919ef47b43c43def612 100644 (file)
@@ -12,6 +12,9 @@ namespace n_koopa;
 require_once('common/base/classes/base_error.php');
 require_once('common/base/classes/base_return.php');
 
+require_once('common/database/enumerations/database_owner_to.php');
+require_once('common/database/enumerations/database_user.php');
+
 require_once('common/database/classes/database_string.php');
 
 /**
@@ -26,7 +29,7 @@ trait t_database_owner_to {
    *
    * @param int|null $owner_to
    *   The owner type to assign.
-   *   Should be one of: c_database_code_user.
+   *   Should be one of: e_database_user.
    *   Set to NULL to disable.
    * @param string|null $user_name
    *   (optional) When non-NULL this is the database user name.
@@ -48,7 +51,7 @@ trait t_database_owner_to {
       return c_base_return_error::s_false($error);
     }
 
-    if ($owner_type == c_database_code_user::USER_NAME) {
+    if ($owner_type == e_database_user::NAME) {
       if (!is_null($user_name) && !is_string($user_name)) {
         $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'user_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
         return c_base_return_error::s_false($error);
@@ -67,10 +70,10 @@ trait t_database_owner_to {
     $this->query_owner_to = $owner_to;
     $this->query_owner_to_user_name = NULL;
 
-    if ($owner_type == c_database_code_user::USER_CURRENT) {
+    if ($owner_type == e_database_user::CURRENT) {
       $this->query_owner_to_user_name = c_database_string::USER_CURRENT;
     }
-    else if ($owner_type == c_database_code_user::USER_SESSION) {
+    else if ($owner_type == e_database_user::SESSION) {
       $this->query_owner_to_user_name = c_database_string::USER_SESSION;
     }
 
@@ -81,7 +84,7 @@ trait t_database_owner_to {
    * Get the currently assigned sql owner to.
    *
    * @return c_base_return_int|c_base_return_null
-   *   A (c_database_code_user) code representing the owner on success.
+   *   A (e_database_user) code representing the owner on success.
    *   NULL without error bit set is returned if not assigned.
    *   NULL with the error bit set is returned on error.
    */
index a7d097b018817c16049c1e34b0372b3c7545ef80..1d8c753b4ba6958ec3381b87131ee0bcc4458993 100644 (file)
@@ -12,6 +12,8 @@ namespace n_koopa;
 require_once('common/base/classes/base_error.php');
 require_once('common/base/classes/base_return.php');
 
+require_once('common/database/enumerations/database_reset.php');
+
 require_once('common/database/classes/database_code.php');
 
 /**
@@ -26,7 +28,7 @@ trait t_database_reset {
    *
    * @param int|null $reset
    *   The reset code to assign.
-   *   Should be one of: c_database_code_reset.
+   *   Should be one of: e_database_reset.
    *   Set to NULL to disable.
    * @param string|null $parameter
    *   (optional) When non-NULL this is the configuration parameter.
@@ -48,7 +50,7 @@ trait t_database_reset {
       return c_base_return_error::s_false($error);
     }
 
-    if ($reset == c_database_code_reset::PARAMETER) {
+    if ($reset == e_database_reset::PARAMETER) {
       if (!is_null($parameter) || !is_string($parameter)) {
         $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
         return c_base_return_error::s_false($error);
@@ -58,7 +60,7 @@ trait t_database_reset {
       $this->query_reset_parameter = $parameter;
       return new c_base_return_true();
     }
-    else if ($reset == c_database_code_reset::ALL) {
+    else if ($reset == e_database_reset::ALL) {
       $this->query_reset = $reset;
       $this->query_reset_parameter = NULL;
       return new c_base_return_true();
index d7b2053b17909710395eba0f01dafd5bb8ac648e..93837f420c5ab8cb9c8398ed9a2242747b21b120 100644 (file)
@@ -12,6 +12,8 @@ namespace n_koopa;
 require_once('common/base/classes/base_error.php');
 require_once('common/base/classes/base_return.php');
 
+require_once('common/database/enumerations/database_set.php');
+
 require_once('common/database/classes/database_code.php');
 
 /**
@@ -53,7 +55,7 @@ trait t_database_set {
       return c_base_return_error::s_false($error);
     }
 
-    if ($set == c_database_code_set::TO || $set == c_database_code_set::EQUAL) {
+    if ($set == e_database_set::TO || $set == e_database_set::EQUAL) {
       if (!is_null($parameter) || !is_string($parameter)) {
         $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
         return c_base_return_error::s_false($error);
@@ -69,7 +71,7 @@ trait t_database_set {
       $this->query_set_value = $value;
       return new c_base_return_true();
     }
-    else if ($set == c_database_code_set::FROM_CURRENT) {
+    else if ($set == e_database_set::FROM_CURRENT) {
       $this->query_set = $set;
       $this->query_set_parameter = NULL;
       $this->query_set_value = NULL;
index 63bd0501f5bdc7856a244b29db55636f2408e40d..a31b378c77128e32f17734df328bc1202797d6b1 100644 (file)
@@ -37,7 +37,7 @@ class c_standard_database extends c_base_database {
     $query_parameters[8] = $response_code;
 
     if ($log_type === c_base_log::TYPE_CONNECT) {
-      $query_parameters[0] = "Logging in to the system.";
+      $query_parameters[0] = 'Logging in to the system.';
       $query_parameters[1] = c_base_log::TYPE_SESSION;
       $query_parameters[2] = c_base_log::TYPE_CONNECT;
       $query_parameters[3] = c_base_error::SEVERITY_INFORMATIONAL;
@@ -63,7 +63,7 @@ class c_standard_database extends c_base_database {
       }
     }
     else if ($log_type === c_base_log::TYPE_DISCONNECT) {
-      $query_parameters[0] = "Logging out of the system.";
+      $query_parameters[0] = 'Logging out of the system.';
       $query_parameters[1] = c_base_log::TYPE_SESSION;
       $query_parameters[2] = c_base_log::TYPE_DISCONNECT;
       $query_parameters[3] = c_base_error::SEVERITY_INFORMATIONAL;
@@ -71,7 +71,7 @@ class c_standard_database extends c_base_database {
       $query_parameters[9] = NULL;
     }
     else if ($log_type === c_base_log::TYPE_CREATE) {
-      $query_parameters[0] = "Created the user account.";
+      $query_parameters[0] = 'Created the user account.';
       $query_parameters[1] = c_base_log::TYPE_CREATE;
       $query_parameters[2] = c_base_log::TYPE_NONE;
       $query_parameters[3] = c_base_error::SEVERITY_INFORMATIONAL;
@@ -84,7 +84,7 @@ class c_standard_database extends c_base_database {
         $user_name = $data['user_name'];
       }
 
-      $query_parameters[0] = "Failed to login as the user ':{user_name}'.";
+      $query_parameters[0] = 'Failed to login as the user \':{user_name}\'.';
       $query_parameters[1] = c_base_log::TYPE_CONNECT;
       $query_parameters[2] = c_base_log::TYPE_FAILURE;
       $query_parameters[3] = c_base_error::SEVERITY_NOTICE;