mura

Class dbUtility

lucee.Component
    extended by mura.cfobject
      extended by mura.dbUtility

This provides a CRUD utility manage database schemas

Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init([any configBean], [any utility])
    Method Summary
    any _parseInt([any String])
         Parse out the first set of numbers in a string.
    any addColumn([any datatype='varchar'], [any length='50'], [any nullable='true'], [any default='null'], [any autoincrement='false'], [any table='[runtime expression]'])
    any addForeignKey([any column], [any fkColumn], [any fkTable], [any table='[runtime expression]'])
    any addIndex([any column=''], [any table='[runtime expression]'])
    any addPrimaryKey([any column=''], [any table='[runtime expression]'])
    any alterColumn([any column=''], [any datatype='varchar'], [any length='50'], [any nullable='true'], [any default='null'], [any autoincrement='false'], [any table='[runtime expression]'])
    private any buildForeignKeyMetaData([any rs], [any table])
    private any buildIndexMetaData([any rs], [any table])
    any buildSchemaFromProperties([any obj])
    any columnExists([any column], [any table='[runtime expression]'])
    any columnMetaData([any column], [any table='[runtime expression]'])
    any columnParamType([any column], [any table='[runtime expression]'])
    any columns([any table='[runtime expression]'])
    any dropColumn([any column=''], [any table='[runtime expression]'])
    any dropForeignKey([any column], [any fkColumn], [any fkTable], [any table='[runtime expression]'])
    any dropIndex([any column=''], [any table='[runtime expression]'])
    any dropPrimaryKey([any table='[runtime expression]'])
    any dropTable([any table='[runtime expression]'])
    any foreignKeyExists([any column], [any fkColumn], [any fkTable], [any table='[runtime expression]'])
    any foreignKeyMetaData([any column], [any fkColumn], [any fkTable], [any table='[runtime expression]'])
    any foreignKeys([any table='[runtime expression]'])
    any getDefaultColumnMetaData()
    any indexes([any table='[runtime expression]'])
    any indexExists([any column], [any table='[runtime expression]'])
    any indexMetaData([any column], [any table='[runtime expression]'])
    any primaryKeyConstraintName([any table='[runtime expression]'])
    any primaryKeyExists([any table='[runtime expression]'])
    any primaryKeyMetaData([any table='[runtime expression]'])
    any purgeCache()
    any qualifySchema([any table])
         Add schema to table name where required.
    any renameColumn([any column], [any newcolumn], [any table='[runtime expression]'])
    any setTable([any table])
    any tableExists([any table='[runtime expression]'])
    any tables()
    private any transformColumnMetaData([any rs], [any table])
         Translates from db to Mura.
    private any transformDataType([any datatype='varchar'], [any length='50'])
         Translates to DB datatype.
    any transformIndexName([any column], [any table='[runtime expression]'])
    any transformParamType([any paramType])
    any version()
     
    Methods inherited from class mura.cfobject
    commitTracePoint, convertTimezone, deleteMethod, get, getAsJSON, getAsStruct, getBean, getConfigBean, getCurrentUser, getEventManager, getFeed, getHTTPAttrs, getHTTPService, getJavaTimezone, getPlugin, getPluginManager, getQueryAttrs, getQueryService, getServiceFactory, getSession, getValue, hasCustomDatasource, initTracePoint, inject, injectMethod, invokeMethod, mixin, parseDateArg, removeValue, set, setValue, valueExists
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init([any configBean], [any utility])

    Parameters:
    configBean
    utility

    Method Detail

    _parseInt

    public any _parseInt([any String])

    Parse out the first set of numbers in a string.

    Parameters:
    String
    Returns:
    Returns a string.

    addColumn

    public any addColumn([any datatype='varchar'], [any length='50'], [any nullable='true'], [any default='null'], [any autoincrement='false'], [any table='[runtime expression]'])

    Parameters:
    datatype - varchar,char,text,longtext,datetime,tinyint,int,float,double
    length
    nullable
    default
    autoincrement
    table

    addForeignKey

    public any addForeignKey([any column], [any fkColumn], [any fkTable], [any table='[runtime expression]'])

    Parameters:
    column
    fkColumn
    fkTable
    table

    addIndex

    public any addIndex([any column=''], [any table='[runtime expression]'])

    Parameters:
    column
    table

    addPrimaryKey

    public any addPrimaryKey([any column=''], [any table='[runtime expression]'])

    Parameters:
    column
    table

    alterColumn

    public any alterColumn([any column=''], [any datatype='varchar'], [any length='50'], [any nullable='true'], [any default='null'], [any autoincrement='false'], [any table='[runtime expression]'])

    Parameters:
    column
    datatype - varchar,char,text,longtext,datetime,tinyint,int,float,double
    length
    nullable
    default
    autoincrement
    table

    buildForeignKeyMetaData

    private any buildForeignKeyMetaData([any rs], [any table])

    Parameters:
    rs
    table

    buildIndexMetaData

    private any buildIndexMetaData([any rs], [any table])

    Parameters:
    rs
    table

    buildSchemaFromProperties

    public any buildSchemaFromProperties([any obj])

    Parameters:
    obj

    columnExists

    public any columnExists([any column], [any table='[runtime expression]'])

    Parameters:
    column
    table

    columnMetaData

    public any columnMetaData([any column], [any table='[runtime expression]'])

    Parameters:
    column
    table

    columnParamType

    public any columnParamType([any column], [any table='[runtime expression]'])

    Parameters:
    column
    table

    columns

    public any columns([any table='[runtime expression]'])

    Parameters:
    table

    dropColumn

    public any dropColumn([any column=''], [any table='[runtime expression]'])

    Parameters:
    column
    table

    dropForeignKey

    public any dropForeignKey([any column], [any fkColumn], [any fkTable], [any table='[runtime expression]'])

    Parameters:
    column
    fkColumn
    fkTable
    table

    dropIndex

    public any dropIndex([any column=''], [any table='[runtime expression]'])

    Parameters:
    column
    table

    dropPrimaryKey

    public any dropPrimaryKey([any table='[runtime expression]'])

    Parameters:
    table

    dropTable

    public any dropTable([any table='[runtime expression]'])

    Parameters:
    table

    foreignKeyExists

    public any foreignKeyExists([any column], [any fkColumn], [any fkTable], [any table='[runtime expression]'])

    Parameters:
    column
    fkColumn
    fkTable
    table

    foreignKeyMetaData

    public any foreignKeyMetaData([any column], [any fkColumn], [any fkTable], [any table='[runtime expression]'])

    Parameters:
    column
    fkColumn
    fkTable
    table

    foreignKeys

    public any foreignKeys([any table='[runtime expression]'])

    Parameters:
    table

    getDefaultColumnMetaData

    public any getDefaultColumnMetaData()


    indexes

    public any indexes([any table='[runtime expression]'])

    Parameters:
    table

    indexExists

    public any indexExists([any column], [any table='[runtime expression]'])

    Parameters:
    column
    table

    indexMetaData

    public any indexMetaData([any column], [any table='[runtime expression]'])

    Parameters:
    column
    table

    primaryKeyConstraintName

    public any primaryKeyConstraintName([any table='[runtime expression]'])

    Parameters:
    table

    primaryKeyExists

    public any primaryKeyExists([any table='[runtime expression]'])

    Parameters:
    table

    primaryKeyMetaData

    public any primaryKeyMetaData([any table='[runtime expression]'])

    Parameters:
    table

    purgeCache

    public any purgeCache()


    qualifySchema

    public any qualifySchema([any table])

    Add schema to table name where required

    Parameters:
    table

    renameColumn

    public any renameColumn([any column], [any newcolumn], [any table='[runtime expression]'])

    Parameters:
    column
    newcolumn
    table

    setTable

    public any setTable([any table])

    Parameters:
    table

    tableExists

    public any tableExists([any table='[runtime expression]'])

    Parameters:
    table

    tables

    public any tables()


    transformColumnMetaData

    private any transformColumnMetaData([any rs], [any table])

    Translates from db to Mura

    Parameters:
    rs
    table

    transformDataType

    private any transformDataType([any datatype='varchar'], [any length='50'])

    Translates to DB datatype

    Parameters:
    datatype
    length

    transformIndexName

    public any transformIndexName([any column], [any table='[runtime expression]'])

    Parameters:
    column
    table

    transformParamType

    public any transformParamType([any paramType])

    Parameters:
    paramType

    version

    public any version()