OpenPetra
Free Administration Software for Non-Profits
GenerateSQL.TWriteSQL Class Reference

This class will write the SQL create table statements and other SQL statements using the datadefinitionn from the xml file More...

Public Types

enum  eDatabaseType { PostgreSQL , MySQL }
 list of all supported database types More...
 

Static Public Member Functions

static eDatabaseType StringToDBMS (string name)
 parse the database type from a string More...
 
static void WriteSQL (TDataDefinitionStore AStore, eDatabaseType ATargetDatabase, String AOutputFile)
 create the scripts for creating a database. ie. the sql create table scripts etc are written More...
 
static string WriteField (eDatabaseType ATargetDatabase, TTable ATable, TTableField field, bool first, bool AWithComments)
 write the part of the sql creation script for a specific column More...
 

Detailed Description

This class will write the SQL create table statements and other SQL statements using the datadefinitionn from the xml file

Member Enumeration Documentation

◆ eDatabaseType

list of all supported database types

Enumerator
PostgreSQL 

PostgreSQL

MySQL 

MySQL

Member Function Documentation

◆ StringToDBMS()

static eDatabaseType GenerateSQL.TWriteSQL.StringToDBMS ( string  name)
inlinestatic

parse the database type from a string

Parameters
name
Returns

◆ WriteField()

static string GenerateSQL.TWriteSQL.WriteField ( eDatabaseType  ATargetDatabase,
TTable  ATable,
TTableField  field,
bool  first,
bool  AWithComments 
)
inlinestatic

write the part of the sql creation script for a specific column

Parameters
ATargetDatabase
ATable
field
first
AWithComments
Returns

◆ WriteSQL()

static void GenerateSQL.TWriteSQL.WriteSQL ( TDataDefinitionStore  AStore,
eDatabaseType  ATargetDatabase,
String  AOutputFile 
)
inlinestatic

create the scripts for creating a database. ie. the sql create table scripts etc are written

Parameters
AStore
ATargetDatabase
AOutputFile

The documentation for this class was generated from the following file: