flash.data

# SQLColumnSchema - AS3

Package | flash.data
Class | public class SQLColumnSchema
Inheritance | SQLColumnSchema Object

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

The SQLColumnSchema class provides information describing the characteristics of a specific column within a table in a database.

To obtain column schema information for one or more tables in a database, use the `SQLConnection.loadSchema()` method to load the schema information, making certain to use `true` for the `includeColumnSchema` argument's value. In the resulting SQLSchemaResult instance, each table and view definition includes a `columns` property — an array of SQLColumnSchema instances representing the columns in the table or view.

Generally, developer code does not construct SQLColumnSchema instances directly.

Related API Elements

flash.data.SQLConnection.loadSchema()
flash.data.SQLTableSchema
flash.data.SQLViewSchema

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | allowNull : Boolean [read-only] Indicates whether NULL values are allowed in this column. | SQLColumnSchema
|  | autoIncrement : Boolean [read-only] Indicates whether this is an auto-increment column. | SQLColumnSchema
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | dataType : String [read-only] Gets the data type of the column as a string. | SQLColumnSchema
|  | defaultCollationType : String [read-only] Indicates the default collation sequence that is defined for this column. | SQLColumnSchema
|  | name : String [read-only] Gets the name of the column. | SQLColumnSchema
|  | primaryKey : Boolean [read-only] Indicates whether this column is the primary key column (or one of the primary key columns in a composite key) for its associated table. | SQLColumnSchema

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | SQLColumnSchema(name:String, primaryKey:Boolean, allowNull:Boolean, autoIncrement:Boolean, dataType:String, defaultCollationType:String) Constructs a SQLColumnSchema instance. | SQLColumnSchema
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### allowNull

property

`allowNull:Boolean` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

Indicates whether `NULL` values are allowed in this column. A column that is declared with a `NOT NULL` constraint has a `false` value for the `allowNull` property.

Implementation
`public function get allowNull():Boolean`

### autoIncrement

property

`autoIncrement:Boolean` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

Indicates whether this is an auto-increment column. An auto-increment column is a special type of `PRIMARY KEY` column whose value is automatically generated as the next value in a sequence of integers when a new row is inserted into the table.

Implementation
`public function get autoIncrement():Boolean`

### dataType

property

`dataType:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

Gets the data type of the column as a string. The value is the literal data type name that was specified in the `CREATE TABLE` statement that was used to define the table, or `null` if no data type was specified.

Implementation
`public function get dataType():String`

### defaultCollationType

property

`defaultCollationType:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

Indicates the default collation sequence that is defined for this column. The value of this property corresponds to one of the constants in the SQLCollationType class:

- `SQLCollationType.BINARY` indicates that the column uses the `BINARY` collation sequence.
- `SQLCollationType.NO_CASE` indicates that the column uses the `NOCASE` collation sequence, meaning that text comparisons are made in a case-insensitive manner.

Implementation
`public function get defaultCollationType():String`

Related API Elements

flash.data.SQLCollationType

### name

property

`name:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

Gets the name of the column.

Implementation
`public function get name():String`

### primaryKey

property

`primaryKey:Boolean` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

Indicates whether this column is the primary key column (or one of the primary key columns in a composite key) for its associated table.

Implementation
`public function get primaryKey():Boolean`
Constructor Detail

### SQLColumnSchema

()
Constructor

`public function SQLColumnSchema(name:String, primaryKey:Boolean, allowNull:Boolean, autoIncrement:Boolean, dataType:String, defaultCollationType:String)`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

Constructs a SQLColumnSchema instance. Generally, developer code does not call the SQLColumnSchema constructor directly. To obtain schema information for a database, call the `SQLConnection.loadSchema()` method.

Parameters

| `name:String` — The name of the column.
| `primaryKey:Boolean` — Indicates whether this column is a part of the primary key for the associated table.
| `allowNull:Boolean` — Indicates whether this column can contain `NULL` values.
| `autoIncrement:Boolean` — Indicates whether this is an auto increment column.
| `dataType:String` — The declared type of the column.
| `defaultCollationType:String` — The collation sequence defined for this column. This value corresponds to one of the constants in the SQLCollationType class:

- `SQLCollationType.BINARY` indicates that the column uses the `BINARY` collation sequence.
- `SQLCollationType.NO_CASE` indicates that the column uses the `NOCASE` collation sequence, meaning text comparisons are made in a case-insensitive manner.

Related API Elements

flash.data.SQLConnection.loadSchema()
flash.data.SQLCollationType

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00