class: ConvertSQL

public class: ConvertSQL
Author:
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 6.12.2005 2:41:39; Modified: 6.12.2005 17:35:53;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {F8F4A329-8FB3-423c-A66C-984676680D8E}
Summary description for ConvertSQL.

 

Goto: Fields, Methods

See also: DatabaseInfo

Appears in: Database interface

Connections
 
ConvertSQL Attributes
Attribute Details
private string
  driver
Notes: Name of Driver

private bool
  failed
Notes: If object is valid

private string
  dbName
Notes: Name of database (from cfg file)

private string
  driverDescription
Notes: Description (from cfg file)

private string
  columnInt
Notes: Data type for simple type INT

private string
  columnDouble
Notes: Data type for simple type DOUBLE

private string
  columnString
Notes: Data type for simple type STRING

private string
  columnLongString
Notes: Data type for simple type LONG STRING

private string
  showTables
Notes: SQL statement for obtain all table names in this connection

private string
  alterTableModify
Notes: SQL statement for alter table - modify column type

private string
  alterTableAdd
Notes: SQL statement for alter table - add new column

private string
  alterTableRemove
Notes: SQL statement for alter table - remove column

private string
  alterTableRename
Notes: SQL statement for alter table - rename column

private string
  dropTable
Notes: SQL statement for drop table

private string
  connectionString
Notes: Connection string associated with database connection

 
ConvertSQL Methods
Operation Details
public
ConvertSQL():
Notes: Constructor. Set all values to "unknown driver"
public
ConvertSQL(
   string path,
   string fileName,
   string driver,
   string connectionString):
Notes: Constructor. Look up informations according current database connection.
public
SimpleToDbType(
   string simpleType):string
Notes: Convert Simple type to database type

@returns Database type
public
ShowTables():string
Notes: SQL statement for show all tables

@returns SQL statement
public
AlterTableModify(
   string tableName,
   string colName,
   string newType):string
Notes: SQL statement for modify column type

@returns SQL Statement
public
AlterTableRename(
   string tableName,
   string colNameFrom,
   string colNameTo):string
Notes: SQL statement for rename column

@returns SQL Statement
public
AlterTableAdd(
   string tableName,
   string colName,
   string newType):string
Notes: SQL statement for add new column

@returns
public
AlterTableRemove(
   string tableName,
   string colName):string
Notes: SQL statement to remove column

@returns SQL statement
public
DropTable(
   string tableName):string
Notes: SQL statement for drop table

@returns SQL statement
private
LoadSqlAccordingDriver(
   string path,
   string file,
   string driver,
   string connectionString):bool
Notes: Fill sql statements according driver name.

@returns SQL statement
public
IsOk():bool
<<property>>
Notes: Validity of this object.
public
Driver():string
<<property>>
Notes: Driver