SBM ModScript Reference → Programming SBM ModScript → Object Types → AppRecord → AppRecord GetSchemaColumns() Method
Returns a Vector of SchemaColumn objects. Will not include fields for VarRecord or ProjectBasedRecord objects.
Parameter | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Vector |
Each entry will be a SchemaColumn object representing a column in the database that this item can interact with. For details, see SchemaColumn. |
SBM ModScript version: 11.3.
def getDBTypeNameText( type ) { switch( type ) { case(DBTypeConstants.BIGINT) { return "BigInteger"; } case(DBTypeConstants.INTEGER) { return "Integer"; } case(DBTypeConstants.SMALLINT) { return "SmallInteger"; } case(DBTypeConstants.TINYINT) { return "TinyInteger"; } case(DBTypeConstants.DOUBLE) { return "Double"; } case(DBTypeConstants.FLOAT) { return "Float"; } case(DBTypeConstants.DATETIME) { return "Datetime"; } case(DBTypeConstants.DECIMAL) { return "Decimal"; } case(DBTypeConstants.NUMERIC) { return "Numeric"; } case(DBTypeConstants.CHAR) { return "Char"; } case(DBTypeConstants.VARCHAR) { return "Varchar"; } case(DBTypeConstants.LONGVARCHAR) { return "LongVarchar"; } default { return "Unknown type: ${schema.type}"; } } } var record = Ext.CreateAppRecord( Ext.TableId( "TS_USERS" ) ); for( schema : record.GetSchemaColumns() ){ Ext.WriteStream( schema.name + " | " + getDBTypeNameText( schema.type ) + " | " + schema.length + "<br />"); }
Result:
TS_ID | Integer | 4 TS_LOGINID | Varchar | 64 TS_PASSWORD | Varchar | 258 TS_NAME | Varchar | 64 TS_TELEPHONE | Varchar | 64 ...
None.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.