Append the provided schema to this schema and return the result
as a new schema. Columns order: [this][provided schema columns].
500294
NodeSchema join(NodeSchema schema) {
        NodeSchema copy = this.clone();
        for (SchemaColumn column: schema.getColumns()) {
            copy.addColumn(column.clone());
        }
        return copy;
    }
997791
def insert(self):
        """"""
        ret = True

        schema = self.schema
        fields = self.depopulate(False)

        q = self.query
        q.set_fields(fields)
        pk = q.insert()
        if pk:
            fields = q.fields
            fields[schema.pk.name] = pk
            self._populate(fields)

        else:
            ret = False

        return ret
1075087
private void createColumn() {
		connection.addColumn(SpatialReferenceSystem.TABLE_NAME, COLUMN_NAME,
				COLUMN_DEF);

		// Update the existing known SRS values
		updateDefinition(GeoPackageProperties.getIntegerProperty(
				PropertyConstants.WGS_84, PropertyConstants.SRS_ID),
				GeoPackageProperties.getProperty(PropertyConstants.WGS_84,
						PropertyConstants.DEFINITION_12_063));
		updateDefinition(
				GeoPackageProperties.getIntegerProperty(
						PropertyConstants.UNDEFINED_CARTESIAN,
						PropertyConstants.SRS_ID),
				GeoPackageProperties.getProperty(
						PropertyConstants.UNDEFINED_CARTESIAN,
						PropertyConstants.DEFINITION_12_063));
		updateDefinition(GeoPackageProperties.getIntegerProperty(
				PropertyConstants.UNDEFINED_GEOGRAPHIC,
				PropertyConstants.SRS_ID), GeoPackageProperties.getProperty(
				PropertyConstants.UNDEFINED_GEOGRAPHIC,
				PropertyConstants.DEFINITION_12_063));
		updateDefinition(GeoPackageProperties.getIntegerProperty(
				PropertyConstants.WEB_MERCATOR, PropertyConstants.SRS_ID),
				GeoPackageProperties.getProperty(
						PropertyConstants.WEB_MERCATOR,
						PropertyConstants.DEFINITION_12_063));
	}
467532
def _construct_columns(self, column_map):
        
        '''  '''
        
        from sqlalchemy import Column, String, Boolean, Integer, Float, Binary 
    
        column_args = []
        for key, value in column_map.items():
            record_key = value[0]
            datatype = value[1]
            max_length = value[2]
            if record_key == 'id':
                if datatype in ('string', 'float', 'integer'):
                    if datatype == 'string':
                        if max_length:
                            column_args.insert(0, Column(record_key, String(max_length), primary_key=True))
                        else:
                            column_args.insert(0, Column(record_key, String, primary_key=True))
                    elif datatype == 'float':
                        column_args.insert(0, Column(record_key, Float, primary_key=True))
                    elif datatype == 'integer':
                        column_args.insert(0, Column(record_key, Integer, primary_key=True))
                else:
                    raise ValueError('Field "id" in record_schema must be a string, float or integer.')
            else:
                if datatype == 'boolean':
                    column_args.append(Column(record_key, Boolean))
                elif datatype == 'string':
                    if max_length:
                        column_args.append(Column(record_key, String(max_length)))
                    else:
                        column_args.append(Column(record_key, String))
                elif datatype == 'float':
                    column_args.append(Column(record_key, Float))
                elif datatype == 'integer':
                    column_args.append(Column(record_key, Integer))
                elif datatype == 'list':
                    column_args.append(Column(record_key, Binary))
        
        return column_args
1277818
def merge(self, schema):
        
        for item in schema.attributes.items():
            if item[0] in self.attributes:
                continue
            self.all.append(item[1])
            self.attributes[item[0]] = item[1]
        for item in schema.elements.items():
            if item[0] in self.elements:
                continue
            self.all.append(item[1])
            self.elements[item[0]] = item[1]
        for item in schema.types.items():
            if item[0] in self.types:
                continue
            self.all.append(item[1])
            self.types[item[0]] = item[1]
        for item in schema.groups.items():
            if item[0] in self.groups:
                continue
            self.all.append(item[1])
            self.groups[item[0]] = item[1]
        for item in schema.agrps.items():
            if item[0] in self.agrps:
                continue
            self.all.append(item[1])
            self.agrps[item[0]] = item[1]
        schema.merged = True
        return self
477101
def build_schema(self):
        
        container = SchemaCollection(self)
        for t in [t for t in self.types if t.local()]:
            for root in t.contents():
                schema = Schema(root, self.url, self.options, container)
                container.add(schema)
        if not len(container):  # empty
            root = Element.buildPath(self.root, 'types/schema')
            schema = Schema(root, self.url, self.options, container)
            container.add(schema)
        self.schema = container.load(self.options)
        for s in [t.schema() for t in self.types if t.imported()]:
            self.schema.merge(s)
        return self.schema
1358383
def add_columns(self, model, **fields):
        """"""
        for name, field in fields.items():
            model._meta.add_field(name, field)
            self.ops.append(self.migrator.add_column(
                model._meta.table_name, field.column_name, field))
            if field.unique:
                self.ops.append(self.migrator.add_index(
                    model._meta.table_name, (field.column_name,), unique=True))
        return model
57172
function syncSchema(result, schema) {
  var knex = this.knex;
  return knex.schema.hasTable(schema.tableName)
  .then(function (exists) {
    if (exists) return result;
    return knex.schema.createTable(schema.tableName, defineSchemaTable(schema))
    .then(function () {
      return result.concat([schema]);
    });
  });
}
1221326
function populateSchema(result, schema) {
  var knex = this.knex;
  return knex.schema.hasTable(schema.tableName)
  .then(function (exists) {
    if (! exists || ! schema.populate) return result;
    return schema.populate(knex)
    .then(function () {
      return result.concat([schema]);
    });
  });
}
1028211
def firstMemberSchema(self, schemas):
        
        for schema in schemas:
            if schema.hasColumn(self):
                return schema
        return self.schema()
1000707
def columns(self):
        
        schema = self.schema()
        return [schema.column(col) for col in self.__columns]
875213
def new_columns(columns)
      columns.each do |column|
        new_column(column[:type], column[:label], column[:id], column[:role], column[:pattern])
      end
    end
762926
def add_columns(t0, t1):
    """"""

    for colname in t1.colnames:
        col = t1.columns[colname]
        if colname in t0.columns:
            continue
        new_col = Column(name=col.name, length=len(t0), dtype=col.dtype)  # ,
        # shape=col.shape)
        t0.add_column(new_col)
1030060
public Columns addAll(Columns columns) {
        for (Column column : columns) {
            this.columns.add(column);
        }
        return this;
    }
908691
public static void appendColumns(StringBuilder s, String[] columns,
			String[] columnsAs) {
		String[] wrappedColumns = CoreSQLUtils.quoteWrap(columns);
		wrappedColumns = CoreSQLUtils.buildColumnsAs(wrappedColumns, columnsAs);

		for (int i = 0; i < wrappedColumns.length; i++) {
			String column = wrappedColumns[i];

			if (column != null) {
				if (i > 0) {
					s.append(", ");
				}
				s.append(column);
			}
		}
		s.append(' ');
	}
1180986
private Column add(String schema, String table, String column, int stepDepth, String alias) {
        Column c = new Column(schema, table, column, this.filteredAllTables.get(schema + "." + table).get(column), stepDepth);
        this.columns.put(c, alias);
        this.aliases.put(alias, c);
        return c;
    }
471751
def column(self, model=None):
        
        try:
            schema = (self.__model or model).schema()
        except AttributeError:
            return None
        else:
            return schema.column(self.__column)