puts db information in LOM format as an array
968589
public function to_array()
    {
        debug_message('entering function '.__FUNCTION__.' in '.__CLASS__);
        //lomdata
        $lomdata = array(
            'general' => array(
                'identifier' => array(
                    'catalog' => $this->catalog,
                    'entry' => $this->identifier
                )
            ),//general
            'lifeCycle' => array(),
            'educational' => array(),
            'technical'    => array(),
            'rights' => array(),
            'classification' => array(),
            'metaMetadata' => array(),
            'relation'    => array()
        );
        //-----general.title (M)
        if (empty($this->title)) {
            array_push($this->title, "Untitled");
        }
        $lang = 'pt';
        $lomdata['general']['title'] = array("string?language=$lang" => $this->title[0]);
        //-----general.keyword (M)
        //initialize keyword
        //keywords from subject have the form: Language::keyword1$$Language::keyword2 ..
        $lomdata['general']['keyword'] = array();
        foreach ($this->subject as $elem) {
            $kw_elements = explode('$$', $elem);
            foreach ($kw_elements as $kw_elem) {
                $lang_kw = explode('::', $kw_elem);
                $kw = array_pop($lang_kw);
                if (empty($lang_kw)) {
                    $lang = 'pt';
                } else {
                    $lang = array_pop($lang_kw);
                }
                //add keyword
                if (strlen($kw) > 2) {
                    debug_message('adding keyword: '.$kw.' (length='.strlen($kw).') ; language '.$lang);
                    array_push($lomdata['general']['keyword'], array("string?language=$lang" =>$kw));
                }
            }
        }
        //-----general.description (M)
        //debug_var_dump('this->description', $this->description);
        //debug_var_dump('this', $this);
        if (empty($this->description)) {
            //repeat title in description if empty
            $_title = "";
            if (is_array($this->title)) {
                $_title = end($this->title);
            }
            array_push($this->description, $_title);
        }
        //initialize description
        $lomdata['general']['description'] = array();
        foreach ($this->description as $elem) {
            $lang = 'pt';
            array_push($lomdata['general']['description'], array("string?language=$lang" =>$elem));
            //add keywords from description
            if (strlen($elem) > 2) {
                array_push(
                    $lomdata['general']['keyword'],
                    array("string?language=pt" => implode(', ', array_keys($this->extractCommonWords($elem))))
                );
            }
            //debug_var_dump('lomdata->general->keyword', $lomdata['general']['keyword']);
        }
        //if after all this keyword is still empty....
        if (empty($lomdata['general']['keyword'])) {
            if (is_array($this->type_) && $this->type_[0] == 'collection') {
                array_push($lomdata['general']['keyword'], array("string?language=pt" =>'canal'));
            } else {
                array_push($lomdata['general']['keyword'], array("string?language=pt" =>'video'));
            }
        }
        //-----general.language (M)
        if (empty($this->language)) {
            array_push($this->language, "pt");
        }
        //initialize language
        $lomdata['general']['language'] = array();
        foreach ($this->language as $elem) {
            array_push($lomdata['general']['language'], $elem);
        }
        //-----general.coverage
        if (!empty($this->coverage)) {
            $lomdata['general']['coverage'] = array();
            foreach ($this->coverage as $elem) {
                $lang = 'pt';
                array_push($lomdata['general']['coverage'], array("string?language=$lang" =>$elem));
            }
        }
        //-----lifeCycle.contribute (M)
        if (empty($this->creator) && empty($this->publisher) && empty($this->contributor)) {
            //set unknown creator
            array_push($this->creator, "Unknown");
        }
        //intialize contribute
        $lomdata['lifeCycle']['contribute'] = array();
        //---lifeCycle.contribute -> creator
        if (!empty($this->creator)) {
            foreach ($this->creator as $elem) {
                array_push(
                    $lomdata['lifeCycle']['contribute'],
                    array(
                    'role' => array(
                        'source' => 'LOMv1.0',
                        'value' => 'author'),
                    'entity' => $this->asVcard($elem) )
                );
            }
        }
        //---lifeCycle.contribute -> publisher
        if (!empty($this->publisher)) {
            $date = '';
            if (!empty($this->date_)) {
                $date = $this->date_[0];
            }
            foreach ($this->publisher as $elem) {
                array_push(
                    $lomdata['lifeCycle']['contribute'],
                    array(
                    'role' => array(
                        'source' => 'LOMv1.0',
                        'value' => 'publisher'),
                    'entity' => $this->asVcard($elem),
                    'date' => array('dateTime' => $date) )
                );
            }
        }
        //---lifeCycle.contribute -> editor
        if (!empty($this->contributor)) {
            foreach ($this->contributor as $elem) {
                array_push(
                    $lomdata['lifeCycle']['contribute'],
                    array(
                    'role' => array(
                        'source' => 'LOMv1.0',
                        'value' => 'editor'),
                    'entity' => $this->asVcard($elem) )
                );
            }
        }
        //-----educational.learningResourceType
        $lomdata['educational']['learningResourceType'] =
            array(
            'source' => 'LOMv1.0',
            'value' => 'lecture');
        //-----technical.location (M)
        if (empty($this->source)) {
            array_push($this->source, "undefined");
        }
        //intialize location
        $lomdata['technical']['location'] = array();
        foreach ($this->source as $elem) {
            array_push($lomdata['technical']['location'], $elem);
        }
        //-----technical.thumbnail (M)
        if (empty($this->thumbnail)) {
            array_push($this->thumbnail, 'none');
        }
        $lomdata['technical']['thumbnail'] = $this->thumbnail[0];
        //-----technical.format
        if (!empty($this->format_)) {
            //initialize format
            $lomdata['technical']['format'] = array();
            foreach ($this->format_ as $elem) {
                array_push($lomdata['technical']['format'], $elem);
            }
        }
        //-----rights.description
        if (!empty($this->rights)) {
            //initialize description
            $lomdata['rights']['description'] = array();
            foreach ($this->rights as $elem) {
                $lang = 'pt';
                array_push($lomdata['rights']['description'], array("string?language=$lang" => $elem));
            }
        }
        //metaMetadata.identifier
        $lomdata['metaMetadata']['identifier'] = array(
            'catalog' => $lomdata['general']['identifier']['catalog'],
            'entry' => $lomdata['general']['identifier']['entry']
        );
        //relation
        if (!empty($this->relation)) {
            foreach ($this->relation as $elem) {
                array_push($lomdata['relation'], array(
                    'kind' => array(
                        'source' => 'LOMv1.0',
                        'value' => 'ispartof'),
                    'resource' => array(
                        'description' => array("string?language=en" => $elem)
                    )
                ));
            }
        }

        return $lomdata;
    }
84960
function() {

      // Variable
      var output = [],
        // Function
        createNewFunction = function(value, lessFunction) {
          return "." + lessFunction + "(" + value + ");";
        };

      // Loop all object "field"
      for (var i = 0; i < databaseLen; i++) {
        var dataField = database["field" + i],
          dataLess = dataField.output;
        // If have output data
        if (dataLess) {
          var lenField = dataLess.length,
            lessFunction = dataField.function;
          for (var a = 0; a < lenField; a++) {
            output.push(createNewFunction(dataLess[a], lessFunction));
          }
        }
      }
      return output.join("\n");
    }
1279054
def readddl(db):
    ''''''
    jdoc = []
    for schema in db.contents:
        j = JDOC(None,
                 schema.object_name,
                 schema.comment,
                 schema.object_type)
        jdoc.append(j)
        for table in schema.contents:
            j = JDOC(table.schema_name,
                     table.object_name,
                     table.comment,
                     table.object_type)
            for c in table.contents:
                j.params.append(c)
            jdoc.append(j)
    return jdoc
690860
function(db) {

		function get_documents(data, config, plv8, ERROR, WARNING) {

			function get_document(id, fields) {
				fields = (fields || [{'query':'*'}]);

				var map = {};

				var obj = plv8.execute("SELECT "+fields.map(function(f, i) {
					var k;
					if(f.key) {
						k = 'p__' + i;
						map[k] = f;
						return f.query + ' AS ' + k;
					} else {
						return f.query;
					}
				}).join(', ')+" FROM documents WHERE id = $1 LIMIT 1", [id])[0];

				if(!obj) {
					return obj;
				}

				Object.keys(obj).forEach(function(key) {
					if(!map.hasOwnProperty(key)) {
						return;
					}

					var spec = map[key];
					if(!is_object(spec)) {
						return error('mapped resource missing');
					}
					if(!is_string(spec.key)) {
						return error('key missing');
					}
					var value = obj[key];
					delete obj[key];

					if(is_string(spec.datakey)) {
						if(!obj[spec.datakey]) {
							obj[spec.datakey] = {};
						}
						obj[spec.datakey][spec.key] = value;
					} else {
						obj[spec.key] = value;
					}
				});

				return obj;
			}

			//function get_type(id) {
			//	return plv8.execute("SELECT * FROM types WHERE id = $1 LIMIT 1", [id])[0];
			//}

			function error(msg) {
				plv8.elog(ERROR, msg);
			}

			function warn(msg) {
				plv8.elog(WARNING, msg);
			}

			function is_object(a) {
				return a && (typeof a === 'object');
			}

			function is_array(a) {
				return a && (a instanceof Array);
			}

			function is_string(a) {
				return a && (typeof a === 'string');
			}

			function is_uuid(obj) {
				return /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(obj);
			}

			function get_property_step(last, current) {
				return is_object(last) ? last[current] : undefined;
			}

			/** Get value of property from provided object using a path.
			 * @param obj {object} The object from where to find the value.
			 * @param path {string} The path to the value in object.
			 * @returns {mixed} The value from the object at the end of path or `undefined` if any part is missing.
			 */
			function get_property(obj, path) {
				if(!is_object(obj)) { return error('get_property(obj, ...) not object: '+ obj); }
				if(!is_string(path)) { return error('get_property(..., path) not string: '+ path); }
				return path.split('.').reduce(get_property_step, obj);
			}

			/** Get document by UUID */
			function fetch_object_by_uuid(data, prop, fields, uuid) {
				if(!is_object(data)) { return error('fetch_object_by_uuid(data, ..., ...) not object: '+ data); }
				if(!is_string(prop)) { return error('fetch_object_by_uuid(..., prop, ...) not string: '+ prop); }
				if(!is_uuid(uuid)) { return warn('Property ' + prop + ' was not uuid: ' + uuid); }
				if(data.documents[uuid] === undefined) {
					data.documents[uuid] = get_document(uuid, fields);
				} else {
					return warn('Document already fetched: ' + uuid);
				}
			}

			/* */
			function fetch_object(data, config) {
				var prop, fields;

				if(is_object(config)) {
					prop = config.prop;
					fields = config.fields;
				} else if(is_string(config)) {
					prop = config;
				}

				if(!is_string(prop)) {
					return error('property is not valid: ' + prop);
				}

				fields = fields ? fields : [{'query':'*'}];

				if(!is_array(fields)) {
					return error('fields are not valid: ' + fields);
				}

				var uuid = get_property(data, prop);

				if(is_array(uuid)) {
					// FIXME: This could be implemented with one query
					return uuid.forEach(fetch_object_by_uuid.bind(undefined, data, prop, fields));
				}
				return fetch_object_by_uuid(data, prop, fields, uuid);
			}

			// Check for bad input

			if(!is_object(data)) { return error("get_documents(data, ...) not object"); }
			if(!is_array(config)) { return error("get_documents(..., config) not array"); }

			//var types_id = data.types_id;
			//if(!is_uuid(types_id)) { return error("data.types_id not valid UUID: " + types_id); }

			// Get document type
			//var type = get_type(types_id);
			//if(!is_object(type)) { return error("type not valid object: " + type); }

			//var relations = type.relations || {};
			//if(!is_object(relations)) { return error("type.relations not valid object: " + relations); }

			// Populate documents from `config`
			data.documents = {};
			config.forEach( fetch_object.bind(undefined, data) );
			return data.documents;
		}

		return db.query('CREATE OR REPLACE FUNCTION get_documents(data json, config json) RETURNS json LANGUAGE plv8 VOLATILE AS ' + NoPg._escapeFunction(get_documents, ["data", "config", "plv8", "ERROR", "WARNING"]));
	}
514518
public function setToSql(): array
    {
        if (!$this->set) {
            throw new SqlException('Undefined UPDATE SET columns.');
        }

        $sql = $params = [];

        foreach ($this->set as $item) {
            $sqlPart = $item['sql'];

            $item['params'] && $params = array_merge($params, $item['params']);

            $sql[] = $sqlPart;
        }

        $sql = 'SET ' . implode(', ', $sql);

        return [$sql, $params];
    }
1190277
def record_to_objects(self):
        """"""
        from ambry.orm.exc import NotFoundError

        fr = self.record

        contents = fr.unpacked_contents

        if not contents:
            return

        # Zip transposes an array when in the form of a list of lists, so this transposes so
        # each row starts with the heading and the rest of the row are the values
        # for that row. The bool and filter return false when none of the values
        # are non-empty. Then zip again to transpose to original form.

        non_empty_rows = drop_empty(contents)

        s = self._dataset._database.session

        for i, row in enumerate(non_empty_rows):

            if i == 0:
                header = row
            else:
                d = dict(six.moves.zip(header, row))

                if 'widths' in d:
                    del d['widths']  # Obsolete column in old spreadsheets.

                if 'table' in d:
                    d['dest_table_name'] = d['table']
                    del d['table']

                if 'order' in d:
                    d['stage'] = d['order']
                    del d['order']

                if 'dest_table' in d:
                    d['dest_table_name'] = d['dest_table']
                    del d['dest_table']

                if 'source_table' in d:
                    d['source_table_name'] = d['source_table']
                    del d['source_table']

                d['d_vid'] = self._dataset.vid

                d['state'] = 'synced'

                try:
                    ds = self._dataset.source_file(str(d['name']))
                    ds.update(**d)
                except NotFoundError:
                    name = d['name']
                    del d['name']

                    try:
                        ds = self._dataset.new_source(name, **d)
                    except:
                        print(name, d)
                        import pprint
                        pprint.pprint(d)
                        raise
                except:  # Odd error with 'none' in keys for d
                    print('!!!', header)
                    print('!!!', row)
                    raise

                s.merge(ds)

        self._dataset._database.commit()
301396
function insert()
    {
        $item = array();
        $item['owner'] = arg('owner', 'int');
        $item['name'] = arg('name', '/[^a-z0-9_]/i');
        $item['title'] = arg('title', 'dbsafe');
        $item['caption'] = arg('caption', 'dbsafe');
        $item['description'] = arg('description', 'dbsafe');
        $item['hint'] = arg('hint', 'dbsafe');
        $item['keywords'] = arg('keywords', 'dbsafe');
        $item['template'] = arg('template', 'dbsafe');
        $item['type'] = arg('type', 'dbsafe');
        $item['active'] = arg('active', 'int');
        $item['visible'] = arg('visible', 'int');
        $item['access'] = arg('access', 'int');
        $item['position'] = arg('position', 'int');
        $item['options'] = arg('options');
        $item['created'] = $item['updated'] = gettime('Y-m-d H:i:s');

        $temp = Eresus_CMS::getLegacyKernel()->sections->get("(`name`='" . $item['name'] .
        "') AND (`owner`='" . $item['owner'] . "')");
        if (count($temp) == 0)
        {
            Eresus_CMS::getLegacyKernel()->sections->add($item);
            dbReorderItems('pages', "`owner`='".arg('owner', 'int')."'");
            HTTP::redirect(Eresus_Kernel::app()->getPage()->url(array('id'=>'')));
        }
        else
        {
            Eresus_Kernel::app()->getPage()->addErrorMessage(
                sprintf(errItemWithSameName, $item['name']));
            saveRequest();
            HTTP::redirect(Eresus_CMS::getLegacyKernel()->request['referer']);
        }
    }
1047392
private static function model()
    {
        $files = ['ORM_', 'CRUD', 'ORM', 'Collection', 'ModelArray'];
        $folder = static::$root.'MVC/Model'.'/';

        self::call($files, $folder);

        $files = ['ForeingKeyMethodException', 'ColumnNotEmptyException', 'ManyPrimaryKeysException', 'TableNotFoundException', 'ModelNotFoundException', 'PrimaryKeyNotFoundException'];
        $folder = static::$root.'MVC/Model/Exceptions'.'/';

        self::call($files, $folder);
    }
31035
public function __toArray()
    {
        $data = array();

        foreach (static::schema() as $field => $options) {
            $data[$field] = $this->{$field};
        }

        return $data;
    }
849168
public function toArray(): array
    {
        $result = $this->orgData;
        foreach ($this->addAttributes as $key => $value) {
            $result[$key] = $value;
        }
        foreach ($this->updateAttributes as $key => $value) {
            $result[$key] = $value;
        }
        foreach ($this->removeAttributes as $key => $value) {
            unset($result[$key]);
        }
        return $result;
    }
198182
public function toArray()
    {
        $relations = [];
        $arrayableRelations = [];

        // include any relations exposed by default
       foreach ($this->exposedRelations as $relation) {
            // skip loading a relation if it is from a method
            if (in_array($relation, $this->relationsFromMethod)) {
                // if the relation hasnt been loaded, then load it
                if (!isset($this->$relation)) {
                    $this->$relation = $this->$relation();
                }

                $arrayableRelations[$relation] = $this->$relation;
                continue;
            }

            $this->load($relation);
        }

        // fetch the relations that can be represented as an array
        $arrayableRelations = array_merge($this->getArrayableRelations(), $arrayableRelations);

        // add the relations to the linked array
        foreach ($arrayableRelations as $relation => $value) {
            if (in_array($relation, $this->hidden)) {
                continue;
            }

            if ($value instanceof Pivot) {
                continue;
            }

            if ($value instanceof BaseModel) {
                $relations[$relation] = array('linkage' => array('id' => (string)$value->getKey(), 'type' => $value->getResourceType()));
            } elseif ($value instanceof Collection) {
                $relation = \str_plural($relation);
                $items = ['linkage' => []];
                foreach ($value as $item) {
                    $items['linkage'][] = array('id' => (string)$item->getKey(), 'type' => $item->getResourceType());
                }
                $relations[$relation] = $items;
            }

            // remove models / collections that we loaded from a method
            if (in_array($relation, $this->relationsFromMethod)) {
                unset($this->$relation);
            }
        }

        //add type parameter
        $model_attributes = $this->attributesToArray();
        unset($model_attributes[$this->primaryKey]);

        $attributes = [
            'id'         => (string)$this->getKey(),
            'type'       => $this->getResourceType(),
            'attributes' => $model_attributes
        ];

        if (! count($relations)) {
            return $attributes;
        }

        return array_merge(
            $attributes,
            [ 'links' => $relations ]
        );
    }
960281
protected function modelToYamlArray()
    {
        $fileColumns = [];

        foreach ($this->columns as $column) {
            if (!isset($column['field'])) {
                throw new ApplicationException('Cannot save the list - the column field name should not be empty.');
            }

            $columnName = $column['field'];
            unset($column['field']);

            if (array_key_exists('id', $column)) {
                unset($column['id']);
            }

            $column = $this->preprocessColumnDataBeforeSave($column);

            $fileColumns[$columnName]  = $column;
        }

        return [
            'columns'=>$fileColumns
        ];
    }
989278
function(params, callback) {
			var self = this;
			var collections = [];
		  // Get the collections for this dbName
	  	this.db.listCollections().toArray(function(err, colls) {
			  // Loop through the collections
	  		for (var n = 0; n < colls.length; n++) {

	  			var options = colls[n].options || {};
	  			// Remove the old name.
	  			delete options.create;
		  		// Remove the dbName from the collection name.
	  			options.name = parseName(colls[n].name);
	  			// Set the name as the _id.
	  			options._id = options.name;

	  			// Add it to the list.
	  	  	collections.push(options);
	  	  }

		  	// Async function to add stats to each collection.
		  	var addStats = function(coll, callback){
		  		// Switch databases
		  		var collection = self.db.collection(coll.name);
		  		// Get the stats. null if empty.
		  		collection.stats(function(err, stats){
		  			// Add the stats to the corresponding database.
		  			coll.stats = stats;
			  		callback(err, coll);
		  		});
		  	};

		  	async.each(collections, addStats, function(err){
	  	    if (err) {
	  	    	callback({error:err.errmsg});
	  	    } else {
	  	    	// Sort the collections
	  	    	collections.sort(function (a, b) {
	  	    		return (a.name > b.name) ? 1 : -1;
	  	    	});
	  	    	// Send the collections
					  return callback(null, collections);
	  	    }
		  	});
	  	});
		}
761319
public function apiResult() : array {
		$result = [
			'success' => false,
			'error' => [],
			'pk' => $this->pk,
			'values' => $this->values,
			'values_loaded' => $this->values_loaded,
			'new_serials' => $this->new_serials
		];
		if ($this->hasErrors()) {
			$message = [];
			// details
			$details = [];
			if (!empty($this->collection['details'])) {
				$this->disassembleCollectionObject($this->collection['details'], $details);
			}
			$ignore_fields = [];
			if ($this->collection_object->primary_model->tenant ?? false) {
				$ignore_fields[$this->collection_object->primary_model->tenant_column] = $this->collection_object->primary_model->tenant_column;
			}
			if ($this->collection_object->primary_model->module ?? false) {
				$ignore_fields[$this->collection_object->primary_model->tenant_column] = $this->collection_object->primary_model->tenant_column;
			}
			foreach ($details as $k3 => $v3) {
				foreach ($ignore_fields as $k4 => $v4) {
					if (isset($v3['map'][$k4])) {
						$ignore_fields[$v3['map'][$k4]] = $v3['map'][$k4];
					}
				}
			}
			$message[] = i18n(null, 'Record') . ':';
			$temp = [];
			foreach ($this->pk as $k => $v) {
				if (!empty($ignore_fields[$k])) continue;
				$temp[] = $k . ' = ' . $v;
			}
			$message[] = "\t" . i18n(null, 'Primary Key') . ': ' . implode(', ', $temp);
			// general errors
			if (!empty($this->errors['general']['danger'])) {
				$message[] = "\t" . i18n(null, 'General Errors') . ':';
				foreach ($this->errors['general']['danger'] as $v) {
					$message[] = "\t\t" . $v;
				}
			}
			// fields
			if (!empty($this->errors['flag_error_in_fields'])) {
				$message[] = "\t" . i18n(null, 'Field Errors') . ':';
				foreach ($this->errors['fields'] as $k => $v) {
					if (empty($v['danger'])) continue; // only errors
					// regular fields
					if (strpos($k, '[') === false) {
						$message[] = "\t\t" . $k . ': ';
						foreach ($v['danger'] as $v2) {
							$message[] = "\t\t\t" . $v2;
						}
					} else { // details
						$field = str_replace(']', '', $k);
						$parts = explode('[', $field);
						$message[] = "\t\t" . $details[$parts[0]]['name'] . ', ' . $parts[2] . ': ';
						// pk
						$pk_parts = explode('::', $parts[1]);
						$pk_details = [];
						foreach ($details[$parts[0]]['pk'] as $k2 => $v2) {
							$pk_details[$v2] = $pk_parts[$k2] ?? null;
						}
						$temp = [];
						foreach ($pk_details as $k2 => $v2) {
							if (!empty($ignore_fields[$k2])) continue;
							$temp[] = $k2 . ' = ' . $v2;
						}
						$message[] = "\t\t\t" . i18n(null, 'Primary Key') . ': ' . implode(', ', $temp);
						foreach ($v['danger'] as $v2) {
							$message[] = "\t\t\t" . $v2;
						}
						// todo handle subdetails
					}
				}
			}
			$result['error'][] = implode("\n", $message);
		} else {
			$result['success'] = true;
		}
		return $result;
	}
1254726
private void generateColumnsArray(Finder<SQLProperty> entity) {
		// generate columns array
		Builder sp = FieldSpec.builder(ArrayTypeName.of(String.class), "COLUMNS", Modifier.STATIC, Modifier.PRIVATE,
				Modifier.FINAL);
		String s = "";
		StringBuilder buffer = new StringBuilder();
		for (SQLProperty property : entity.getCollection()) {
			buffer.append(s + "COLUMN_" + columnNameToUpperCaseConverter.convert(property.getName()));
			s = ", ";
		}
		classBuilder.addField(sp.addJavadoc("Columns array\n").initializer("{" + buffer.toString() + "}").build());
		classBuilder.addMethod(MethodSpec.methodBuilder("columns").addModifiers(Modifier.PUBLIC)
				.addJavadoc("Columns array\n").addAnnotation(Override.class).returns(ArrayTypeName.of(String.class))
				.addStatement("return COLUMNS").build());

		classBuilder.addMethod(MethodSpec.methodBuilder("name").addModifiers(Modifier.PUBLIC).addJavadoc("table name\n")
				.addAnnotation(Override.class).returns(TypeName.get(String.class)).addStatement("return TABLE_NAME")
				.build());
	}
1346542
def from_array(cls, arr):
        """"""
        return cls().with_columns([(f, arr[f]) for f in arr.dtype.names])
1204229
function processArray (arr, reqStack) {
  const accum = []
  arr.forEach(function (el) {
    accum.push(schemaForm(el, reqStack))
  })
  return accum
}