summaryrefslogtreecommitdiffstats
path: root/codebase/db_common.php
diff options
context:
space:
mode:
Diffstat (limited to 'codebase/db_common.php')
-rw-r--r--codebase/db_common.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/codebase/db_common.php b/codebase/db_common.php
index 2ae9b22..8d8762e 100644
--- a/codebase/db_common.php
+++ b/codebase/db_common.php
@@ -465,6 +465,22 @@ class DataConfig{
//we not deleting field from $data collection, so it will not be included in data operation, but its data still available
}
+ /*! remove field from dataset config ($text and $data collections)
+
+ removed field will be excluded from all auto-generated queries
+ @param name
+ name of field, or aliase of field
+ */
+ public function remove_field_full($name){
+ $ind = $this->is_field($name);
+ if ($ind==-1) throw new Exception('There was no such data field registered as: '.$name);
+ array_splice($this->text,$ind,1);
+
+ $ind = $this->is_field($name, $this->data);
+ if ($ind==-1) throw new Exception('There was no such data field registered as: '.$name);
+ array_splice($this->data,$ind,1);
+ }
+
/*! check if field is a part of dataset
@param name