DataFaucet 1.0 Beta

datafaucet.system.agent
Class datadefinitionlanguage

WEB-INF.cftags.component
        extended by datafaucet.system.agent.format
            extended by datafaucet.system.agent.engine
                extended by datafaucet.system.agent.datadefinitionlanguage
Direct Known Subclasses:
sqlagent

public class datadefinitionlanguage
extends engine

defines syntax for data-definition language statements


Method Summary
 string ParseDDL(any datasource, any xml, [boolean execute='true'])
private string ParseDDLNode(any datasource, any node, [boolean execute='true'])
private struct ParseDDL_column(any xml)
private struct ParseDDL_constraint(any xml)
private struct ParseDDL_procedure(any xml)
private struct ParseDDL_table(any xml)
private struct ParseDDL_trigger(any xml)
private struct ParseDDL_view(any xml)
private any TransformDDL(any DDL)
 any create(any datasource, string entity, string type, [boolean execute='true'], [boolean throwonerror='true'], [boolean replace='false'])
private array createColumnEntity(any datasource, string entity, array column)
private array createConstraintEntity(any datasource, string entity, string constraint, [string unique=''], [string primarykey=''], [string check=''], [string foreignkey=''], [string reftable=''], [string refcolumns='[runtime expression]'])
private array createProcedureEntity(any datasource, string entity, string syntax, [array param='[runtime expression]'])
private array createSequenceEntity(any datasource, string entity, [numeric increment='1'], [numeric startwith='1'], [string maxvalue=''], [string minvalue=''], [boolean cycle='false'], [string cache=''], [boolean order='false'])
private array createTableEntity(any datasource, string entity, array column)
private array createTriggerEntity(any datasource, string entity, string trigger, string action, string syntax, string exec='after')
private array createViewEntity(string entity, string syntax)
 any drop(any datasource, string entity, string type, [boolean execute='true'], [boolean throwonerror='true'])
private array dropColumnEntity(any datasource, string entity, string column)
private array dropConstraintEntity(any datasource, string entity, string constraint)
private array dropForeignKeyEntity(any datasource, string entity, string constraint)
private array dropPrimaryKeyEntity(any datasource, string entity, string constraint)
private array dropSequenceEntity(any datasource, string entity, string type, [boolean execute='true'], [boolean throwonerror='true'])
private string getAutonumberSyntax(string columnSyntax)
private string getColumnDefault(struct column)
private string getColumnProperties(struct column, any datasource)
private string getColumnReferences(struct column, any datasource)
private string getColumnSyntax(any datasource, string column, [string type='nvarchar(50)'], [boolean key='false'], [boolean required='[runtime expression]'], [boolean unique='[runtime expression]'], [string references=''], [string default], [boolean autonumber='false'])
private string getColumnUniqueness(struct column)
private any getDDL(any ddl)
 string getDataType(string type)
          returns the appropriate data type for a column when creating or altering tables or stored procedures - i.e. converts 'longvarchar' to 'text' with mssql or 'clob' with oracle
private string getParamDefault(struct param)
private string getParamSyntax([string parameter], string type, [boolean required='false'], [boolean out='false'], [string default])
private array getProcedureParameters(any statement)
private array getStoredProcedureSyntax(any statement)
 
Methods inherited from class datafaucet.system.agent.engine
arg, cfsqltype, executeSQL, executeStoredProcedure, getColumnType, getSQL, getSyntaxOrExecute, getTimeCreated, getTraceEnabled, getWriteableColumns, isModified, procedure
 
Methods inherited from class datafaucet.system.agent.format
concatenate, escape, fixOrderby, getDataFaucet, getDataManager, getDefaultLocalization, getEntity, getFullTableName, getNextFromSequence, getNumericScale, getValidator, init, newID, newLine, qp, queryparam, queryparam_bit, queryparam_integer, queryparam_numeric, queryparam_timestamp, raiseUnspecifiedEntityException, replaceConcatenator
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init()

Method Detail

ParseDDL

public string ParseDDL(any datasource, any xml, [boolean execute='true'])

Parameters:
datasource
xml
execute

ParseDDLNode

private string ParseDDLNode(any datasource, any node, [boolean execute='true'])

Parameters:
datasource
node
execute

ParseDDL_column

private struct ParseDDL_column(any xml)

Parameters:
xml

ParseDDL_constraint

private struct ParseDDL_constraint(any xml)

Parameters:
xml

ParseDDL_procedure

private struct ParseDDL_procedure(any xml)

Parameters:
xml

ParseDDL_table

private struct ParseDDL_table(any xml)

Parameters:
xml

ParseDDL_trigger

private struct ParseDDL_trigger(any xml)

Parameters:
xml

ParseDDL_view

private struct ParseDDL_view(any xml)

Parameters:
xml

TransformDDL

private any TransformDDL(any DDL)

Parameters:
DDL

create

public any create(any datasource, string entity, string type, [boolean execute='true'], [boolean throwonerror='true'], [boolean replace='false'])

Parameters:
datasource
entity
type
execute
throwonerror
replace

createColumnEntity

private array createColumnEntity(any datasource, string entity, array column)

Parameters:
datasource
entity
column

createConstraintEntity

private array createConstraintEntity(any datasource, string entity, string constraint, [string unique=''], [string primarykey=''], [string check=''], [string foreignkey=''], [string reftable=''], [string refcolumns='[runtime expression]'])

Parameters:
datasource
entity
constraint
unique
primarykey
check
foreignkey
reftable
refcolumns

createProcedureEntity

private array createProcedureEntity(any datasource, string entity, string syntax, [array param='[runtime expression]'])

Parameters:
datasource
entity
syntax
param

createSequenceEntity

private array createSequenceEntity(any datasource, string entity, [numeric increment='1'], [numeric startwith='1'], [string maxvalue=''], [string minvalue=''], [boolean cycle='false'], [string cache=''], [boolean order='false'])

Parameters:
datasource
entity
increment
startwith
maxvalue
minvalue
cycle
cache
order

createTableEntity

private array createTableEntity(any datasource, string entity, array column)

Parameters:
datasource
entity
column

createTriggerEntity

private array createTriggerEntity(any datasource, string entity, string trigger, string action, string syntax, string exec='after')

Parameters:
datasource
entity
trigger
action
syntax
exec

createViewEntity

private array createViewEntity(string entity, string syntax)

Parameters:
entity
syntax

drop

public any drop(any datasource, string entity, string type, [boolean execute='true'], [boolean throwonerror='true'])

Parameters:
datasource
entity
type
execute
throwonerror

dropColumnEntity

private array dropColumnEntity(any datasource, string entity, string column)

Parameters:
datasource
entity
column

dropConstraintEntity

private array dropConstraintEntity(any datasource, string entity, string constraint)

Parameters:
datasource
entity
constraint

dropForeignKeyEntity

private array dropForeignKeyEntity(any datasource, string entity, string constraint)

Parameters:
datasource
entity
constraint

dropPrimaryKeyEntity

private array dropPrimaryKeyEntity(any datasource, string entity, string constraint)

Parameters:
datasource
entity
constraint

dropSequenceEntity

private array dropSequenceEntity(any datasource, string entity, string type, [boolean execute='true'], [boolean throwonerror='true'])

Parameters:
datasource
entity
type
execute
throwonerror

getAutonumberSyntax

private string getAutonumberSyntax(string columnSyntax)

Parameters:
columnSyntax

getColumnDefault

private string getColumnDefault(struct column)

Parameters:
column

getColumnProperties

private string getColumnProperties(struct column, any datasource)

Parameters:
column
datasource

getColumnReferences

private string getColumnReferences(struct column, any datasource)

Parameters:
column
datasource

getColumnSyntax

private string getColumnSyntax(any datasource, string column, [string type='nvarchar(50)'], [boolean key='false'], [boolean required='[runtime expression]'], [boolean unique='[runtime expression]'], [string references=''], [string default], [boolean autonumber='false'])

Parameters:
datasource
column
type
key
required
unique
references
default
autonumber

getColumnUniqueness

private string getColumnUniqueness(struct column)

Parameters:
column

getDDL

private any getDDL(any ddl)

Parameters:
ddl

getDataType

public string getDataType(string type)
returns the appropriate data type for a column when creating or altering tables or stored procedures - i.e. converts 'longvarchar' to 'text' with mssql or 'clob' with oracle

Parameters:
type

getParamDefault

private string getParamDefault(struct param)

Parameters:
param

getParamSyntax

private string getParamSyntax([string parameter], string type, [boolean required='false'], [boolean out='false'], [string default])

Parameters:
parameter
type
required
out
default

getProcedureParameters

private array getProcedureParameters(any statement)

Parameters:
statement

getStoredProcedureSyntax

private array getStoredProcedureSyntax(any statement)

Parameters:
statement

DataFaucet 1.0 Beta