Config table's schema by TableNamingStrategy.<br>

@see org.beangle.orm.hibernate.RailsNamingStrategy
543700
private void configSchema() {
    TableNamingStrategy namingStrategy = null;
    if (getNamingStrategy() instanceof RailsNamingStrategy) {
      namingStrategy = ((RailsNamingStrategy) getNamingStrategy()).getTableNamingStrategy();
    }

    if (null == namingStrategy) return;
    else {
      // Update SeqGenerator's static variable.
      // Because generator is init by hibernate,cannot inject namingStrategy.
      TableSeqGenerator.namingStrategy = namingStrategy;
    }

    if (namingStrategy.isMultiSchema()) {
      for (PersistentClass clazz : classes.values()) {
        if (Strings.isEmpty(clazz.getTable().getSchema())) {
          String schema = namingStrategy.getSchema(clazz.getEntityName());
          if (null != schema) clazz.getTable().setSchema(schema);
        }
      }

      for (Collection collection : collections.values()) {
        final Table table = collection.getCollectionTable();
        if (null == table) continue;
        if (Strings.isBlank(table.getSchema())) {
          String schema = namingStrategy.getSchema(collection.getOwnerEntityName());
          if (null != schema) table.setSchema(schema);
        }
      }
    }
  }
1325543
void processAlterTableRename(Table table) {

        HsqlName name = readNewSchemaObjectName(SchemaObject.TABLE);

        name.setSchemaIfNull(table.getSchemaName());

        if (table.getSchemaName() != name.schema) {
            throw Error.error(ErrorCode.X_42505);
        }

        database.schemaManager.renameSchemaObject(table.getName(), name);
    }
609666
function Table(name, schema){
    if(!name || typeof name !== "string"){
        throw new Error("Attempting to instantiate a table without a valid name.");
    }
    if(!schema || !(schema instanceof Schema)){
        throw new Error("Attempting to instantiate a table without a valid schema.");
    }

    this.name = name;
    this.schema = schema;
}
675712
def table_rows
      # allow a standard key to be used for doing defaults in YAML
      fixtures.delete("DEFAULTS")

      TableRows.new(
        table_name,
        model_class: model_class,
        fixtures: fixtures,
        config: config,
      ).to_hash
    end
403315
def schema():
    
    tables = orca.list_tables()
    cols = {t: orca.get_table(t).columns for t in tables}
    steps = orca.list_steps()
    injectables = orca.list_injectables()
    broadcasts = orca.list_broadcasts()

    return jsonify(
        tables=tables, columns=cols, steps=steps, injectables=injectables,
        broadcasts=broadcasts)
602752
private static DatabaseFieldConfig configFromField(DatabaseType databaseType, String tableName, Field field)
			throws SQLException {

		if (configFieldNums == null) {
			return DatabaseFieldConfig.fromField(databaseType, tableName, field);
		}

		/*
		 * This, unfortunately, we can't get around. This creates a AnnotationFactory, an array of AnnotationMember
		 * fields, and possibly another array of AnnotationMember values. This creates a lot of GC'd objects.
		 */
		DatabaseField databaseField = field.getAnnotation(DatabaseField.class);

		DatabaseFieldConfig config = null;
		try {
			if (databaseField != null) {
				config = buildConfig(databaseField, tableName, field);
			}
		} catch (Exception e) {
			// ignored so we will configure normally below
		}

		if (config == null) {
			/*
			 * We configure this the old way because we might be using javax annotations, have a ForeignCollectionField,
			 * or may still be using the deprecated annotations. At this point we know that there isn't a @DatabaseField
			 * or we can't do our reflection hacks for some reason.
			 */
			return DatabaseFieldConfig.fromField(databaseType, tableName, field);
		} else {
			workedC++;
			return config;
		}
	}
408577
public SchemaColumn asSchemaColumn() {
        String columnAlias = (m_alias == null) ? m_columnName : m_alias;
        return new SchemaColumn(m_tableName, m_tableAlias,
                m_columnName, columnAlias,
                m_expression, m_differentiator);
    }
948172
def entity_schema
      @entity_schema ||= begin
        if superclass.respond_to?(:entity_schema)
          superschema = superclass.entity_schema

          unless superschema.is_a?(Schema)
            raise Exception, "class-level method `#{superclass}.entity_schema` is required " \
                              'by gem "entity_schema" and must return instance of ' \
                              "`#{Schema}`, but returns a `#{superschema.class}`"
          end

          Schema.new(owner_name: to_s, extends: superschema)
        else
          Schema.new(owner_name: to_s)
        end
      end
    end
639986
def schema_keys
      schema_file = File.join(Rails.root, 'solr_conf', 'schema.xml')
      file = File.open(schema_file)
      doc = Nokogiri::XML(file)
      file.close
      doc.xpath('//fields/field').map { |f| f.attr('name') }
    end
1222716
def results
      ActiveRecord::Base.connection.tables.each do |table|
        model = table.classify.constantize rescue next

        model.columns.each do |column|
          present = model.respond_to?(:nillify_attributes) && model.nillify_attributes.include?(column.name.to_sym)

          @results << [present, model.name, column.name] if include_column(column)
        end
      end

      @results
    end
233975
def config_migration(migration_version)
      source = "#{Dir.pwd}/db/migrate/#{migration_version}_create_#{@scaffold_name}s.rb"
      modify_content(source, 'CreateMigration', "Create#{@model_class}s")   
      modify_content(source, 'migration', "#{@scaffold_name}s") 

      @arguments.each do |value| 
        @attributes << value.split(':').first 
        @data_types << value.split(':').last 
      end

      attribute_data_types = @data_types.reverse
      @attributes.reverse.each_with_index do |value,index|
        add_attributes(source, value, attribute_data_types[index])  
      end
    end
624156
public void registerDefinedSchema(DataSchema schema)
  {
    final ClassTemplateSpec spec = createFromDataSchema(schema);
    _schemaToClassMap.put(schema, spec);
    _classNameToSchemaMap.put(spec.getFullName(), schema);
  }
350774
function () {
            if (!this.__schemaDataset) {
                var ds = this.db.from(this.table), self = this;
                return this.__createTable().chain(function () {
                    return (self.__schemaDataset = ds);
                });
            } else {
                return when(this.__schemaDataset);
            }
        }
1148928
public function map(string $schema, Table $table, string $name, FieldDefinition $definition)
    {
        if (!$definition instanceof AssociationFieldDefinition) {
            throw DoctrineStorageException::invalidDefinition(AssociationFieldDefinition::class, $definition);
        }

        $table->addColumn(
            $name,
            'guid',
            [
                'notnull' => !$definition->isNullable(),
                'default' => $definition->defaultValue(),
                'length' => $definition->options()['length'] ?? null,
                'unique' => $definition->options()['unique'] ?? false,
            ]
        );

        $table->addForeignKeyConstraint(
            $this->tableName($schema, $definition->typeSchema()->name()),
            [$name],
            ['id']
        );
    }
83736
def set_table_name
      [self.old_name, self.new_name].each do |name|
        # make sure this table exists
        if self.table_exists?(name)
          # return true if we are already using this table
          return true if self.klass.table_name == name.to_s
          # otherwise we can change the table name
          self.klass.table_name = name
          return true
        end
      end
      self.raise_no_table_error
    end
831217
@Override
    public Schema transform(Schema schema) {
        int nCols = schema.numColumns();
        List<ColumnMetaData> meta = schema.getColumnMetaData();
        List<ColumnMetaData> newMeta = new ArrayList<>(nCols);
        newMeta.addAll(meta);
        newMeta.add(new StringMetaData(outputColumnName));
        return schema.newSchema(newMeta);
    }
339920
final protected function _tableDefinition() {
        $annotation = Annotation::getClass($this);

        /** @var \ReflectionClass $fieldClass */
        $fieldClass = new \ReflectionClass('\\Gcs\Framework\Core\\Orm\\Entity\\Field');
        /** @var \ReflectionClass $foreignKeyClass */
        $foreignKeyClass = new \ReflectionClass('\\Gcs\Framework\Core\\Orm\\Entity\\ForeignKey');
        /** @var \ReflectionClass $builderClass */
        $builderClass = new \ReflectionClass('\\Gcs\Framework\Core\\Orm\\Builder');

        foreach ($annotation['class'] as $annotationClass) {
            $instance = $annotationClass[0]['instance'];

            switch ($annotationClass[0]['annotation']) {
                case 'Table':
                    $this->name($instance->name);
                    break;

                case 'Form':
                    $this->form($instance->name);
                    break;
            }
        }

        foreach ($annotation['properties'] as $name => $annotationProperties) {
            foreach ($annotationProperties as $annotationProperty) {
                $instance = $annotationProperty['instance'];

                if ($annotationProperty['annotation'] == 'Column') {
                    $this->field($name)->type($fieldClass->getConstant($instance->type))->size($instance->size)->beNull($instance->null == 'true' ? true : false)->primary($instance->primary == 'true' ? true : false)->unique($instance->unique == 'true' ? true : false)->precision($instance->precision)->defaultValue($instance->default)->enum($instance->enum != '' ? explode(',', $instance->enum) : []);

                    $fieldType = $fieldClass->getConstant($instance->type);

                    if (in_array($fieldType, [Field::DATETIME, Field::DATE, Field::TIMESTAMP])) {
                        $this->set($name, new \DateTime());
                    }
                }
                else {
                    $this->field($name)->foreign(['type' => $foreignKeyClass->getConstant($instance->type), 'reference' => explode('.', $instance->to), 'current' => explode('.', $instance->from), 'belong' => $foreignKeyClass->getConstant($instance->belong), 'join' => $builderClass->getConstant($instance->join),]);

                    $foreignType = $foreignKeyClass->getConstant($instance->type);

                    if (in_array($foreignType, [ForeignKey::MANY_TO_MANY, ForeignKey::ONE_TO_MANY])) {
                        $this->set($name, new Collection());
                    }
                }
            }
        }
    }