599 lines
19 KiB
C#
599 lines
19 KiB
C#
using Sarand.Net.Standard.Base.Core;
|
|
using Sarand.Net.Standard.Base.Dbas;
|
|
using Sarand.Net.Standard.Base.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
//---------------------------------------------------------------------------
|
|
// Code generated by Sarand Database Utilities Mon 10-May-2021 16:59:32
|
|
//---------------------------------------------------------------------------
|
|
namespace Saxonite.Base.App
|
|
{
|
|
public class SaxDbDfn
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Table identifiers.
|
|
public enum TableIdx
|
|
{
|
|
Unknown = 0,
|
|
ItemSport,
|
|
JournalistArticle,
|
|
Organisation,
|
|
OrganisationOpportunity,
|
|
Region,
|
|
Sport,
|
|
UserAccount,
|
|
UserOrganisation,
|
|
UserRole,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Column identifiers.
|
|
public enum ColumnIdx
|
|
{
|
|
Unknown = 0,
|
|
ItemSport_Id,
|
|
ItemSport_ItemType,
|
|
ItemSport_ItemId,
|
|
ItemSport_SportId,
|
|
ItemSport_ItemSportData,
|
|
ItemSport_Notes,
|
|
ItemSport_Flags,
|
|
ItemSport_Status,
|
|
ItemSport_CreateOn,
|
|
ItemSport_CreateBy,
|
|
ItemSport_CreateHost,
|
|
ItemSport_UpdateOn,
|
|
ItemSport_UpdateBy,
|
|
ItemSport_UpdateHost,
|
|
JournalistArticle_Id,
|
|
JournalistArticle_UserAccountIdJournalist,
|
|
JournalistArticle_RegionIdPrimary,
|
|
JournalistArticle_SportIdPrimary,
|
|
JournalistArticle_Headline,
|
|
JournalistArticle_Summary,
|
|
JournalistArticle_BodyData,
|
|
JournalistArticle_PublishedAt,
|
|
JournalistArticle_Notes,
|
|
JournalistArticle_Flags,
|
|
JournalistArticle_Status,
|
|
JournalistArticle_CreateOn,
|
|
JournalistArticle_CreateBy,
|
|
JournalistArticle_CreateHost,
|
|
JournalistArticle_UpdateOn,
|
|
JournalistArticle_UpdateBy,
|
|
JournalistArticle_UpdateHost,
|
|
Organisation_Id,
|
|
Organisation_Name,
|
|
Organisation_OrganisationType,
|
|
Organisation_OrganisationCategory,
|
|
Organisation_RegionIdPrimary,
|
|
Organisation_SportIdPrimary,
|
|
Organisation_CountryIso2Code,
|
|
Organisation_PhoneMain,
|
|
Organisation_PhoneAlt,
|
|
Organisation_Notes,
|
|
Organisation_Flags,
|
|
Organisation_Status,
|
|
Organisation_CreateOn,
|
|
Organisation_CreateBy,
|
|
Organisation_CreateHost,
|
|
Organisation_UpdateOn,
|
|
Organisation_UpdateBy,
|
|
Organisation_UpdateHost,
|
|
OrganisationOpportunity_Id,
|
|
OrganisationOpportunity_OrganisationId,
|
|
OrganisationOpportunity_RegionIdPrimary,
|
|
OrganisationOpportunity_SportIdPrimary,
|
|
OrganisationOpportunity_Position,
|
|
OrganisationOpportunity_Outline,
|
|
OrganisationOpportunity_OpportunityData,
|
|
OrganisationOpportunity_PublishedAt,
|
|
OrganisationOpportunity_ExpiresAt,
|
|
OrganisationOpportunity_Notes,
|
|
OrganisationOpportunity_Flags,
|
|
OrganisationOpportunity_Status,
|
|
OrganisationOpportunity_CreateOn,
|
|
OrganisationOpportunity_CreateBy,
|
|
OrganisationOpportunity_CreateHost,
|
|
OrganisationOpportunity_UpdateOn,
|
|
OrganisationOpportunity_UpdateBy,
|
|
OrganisationOpportunity_UpdateHost,
|
|
Region_Id,
|
|
Region_RegionType,
|
|
Region_CountryIso2Code,
|
|
Region_Name,
|
|
Region_Latitude,
|
|
Region_Longitude,
|
|
Region_RegionIdParent,
|
|
Region_Notes,
|
|
Region_Flags,
|
|
Region_Status,
|
|
Region_CreateOn,
|
|
Region_CreateBy,
|
|
Region_CreateHost,
|
|
Region_UpdateOn,
|
|
Region_UpdateBy,
|
|
Region_UpdateHost,
|
|
Sport_Id,
|
|
Sport_Name,
|
|
Sport_Notes,
|
|
Sport_Flags,
|
|
Sport_Status,
|
|
Sport_CreateOn,
|
|
Sport_CreateBy,
|
|
Sport_CreateHost,
|
|
Sport_UpdateOn,
|
|
Sport_UpdateBy,
|
|
Sport_UpdateHost,
|
|
UserAccount_Id,
|
|
UserAccount_EmailAddress,
|
|
UserAccount_Title,
|
|
UserAccount_FirstName,
|
|
UserAccount_Initials,
|
|
UserAccount_LastName,
|
|
UserAccount_PhoneMain,
|
|
UserAccount_PhoneMobile,
|
|
UserAccount_PhoneAlt,
|
|
UserAccount_DateOfBirth,
|
|
UserAccount_PasswordToken,
|
|
UserAccount_PasswordHashed,
|
|
UserAccount_PasswordHistory,
|
|
UserAccount_PasswordChangedAt,
|
|
UserAccount_LastLoginAt,
|
|
UserAccount_LastInvalidLoginAt,
|
|
UserAccount_InvalidLoginCount,
|
|
UserAccount_Notes,
|
|
UserAccount_Flags,
|
|
UserAccount_Status,
|
|
UserAccount_CreateOn,
|
|
UserAccount_CreateBy,
|
|
UserAccount_CreateHost,
|
|
UserAccount_UpdateOn,
|
|
UserAccount_UpdateBy,
|
|
UserAccount_UpdateHost,
|
|
UserOrganisation_Id,
|
|
UserOrganisation_UserAccountId,
|
|
UserOrganisation_OrganisationId,
|
|
UserOrganisation_OrganisationRoleCodes,
|
|
UserOrganisation_OrganisationRoleCount,
|
|
UserOrganisation_Notes,
|
|
UserOrganisation_Flags,
|
|
UserOrganisation_Status,
|
|
UserOrganisation_CreateOn,
|
|
UserOrganisation_CreateBy,
|
|
UserOrganisation_CreateHost,
|
|
UserOrganisation_UpdateOn,
|
|
UserOrganisation_UpdateBy,
|
|
UserOrganisation_UpdateHost,
|
|
UserRole_Id,
|
|
UserRole_UserAccountId,
|
|
UserRole_UserRoleCode,
|
|
UserRole_Notes,
|
|
UserRole_Flags,
|
|
UserRole_Status,
|
|
UserRole_CreateOn,
|
|
UserRole_CreateBy,
|
|
UserRole_CreateHost,
|
|
UserRole_UpdateOn,
|
|
UserRole_UpdateBy,
|
|
UserRole_UpdateHost,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Data members.
|
|
private static readonly int tableCount = 9;
|
|
private static readonly int columnCount = 146;
|
|
private static ulong maxTextLen = 0;
|
|
|
|
//-------------------------------------------------------------------
|
|
// Retrieve Table details (eg. name: 'Company').
|
|
public static int GetTableCount ()
|
|
{
|
|
return tableCount;
|
|
}
|
|
public static String GetTableName (TableIdx table, bool delimitReservedWords = true)
|
|
{
|
|
int tableIdx = (int)table - 1;
|
|
if (tableIdx < 0 || tableIdx >= tableCount) return String.Empty;
|
|
String tableName = tables[(int)tableIdx];
|
|
if (delimitReservedWords) tableName = DelimitReservedWord(tableName);
|
|
return tableName;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Identify the table that corresponds with the specified column.
|
|
public static TableIdx GetTableForColumn (ColumnIdx column)
|
|
{
|
|
int columnIdx = (int)column - 1;
|
|
if (columnIdx < 0 || columnIdx >= columnCount) return TableIdx.Unknown;
|
|
return columns[columnIdx].TableIdx;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Retrieve the specified Column's name (Qualified include table name: '(<Table>.Column>)').
|
|
public static String GetColumnName (ColumnIdx column, bool delimitReservedWords = true)
|
|
{
|
|
int columnIdx = (int)column - 1;
|
|
if (columnIdx < 0 || columnIdx >= columnCount) return String.Empty;
|
|
String columnName = columns[columnIdx].Name;
|
|
if (delimitReservedWords) columnName = DelimitReservedWord(columnName);
|
|
return columnName;
|
|
}
|
|
public static String GetColumnNameQual (ColumnIdx column, String tableAlias = "", bool braces = false)
|
|
{
|
|
String columnName = GetColumnName(column);
|
|
if (!String.IsNullOrEmpty(columnName))
|
|
{
|
|
String tableName = StringUtil.EmptyOnNull(tableAlias);
|
|
if (tableName.IsEmpty()) tableName = GetTableName(GetTableForColumn(column));
|
|
columnName = tableName + (tableName.Length > 0 ? "." : "") + columnName;
|
|
if (braces)
|
|
columnName = "(" + columnName + ")";
|
|
}
|
|
return columnName;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Reserved words.
|
|
private static DbReservedWordDelim reservedWordDelim = DbReservedWordDelim.SquareBrackets;
|
|
public static void SetReservedWordDelim (DbReservedWordDelim reservedWordDelim)
|
|
{
|
|
SaxDbDfn.reservedWordDelim = reservedWordDelim;
|
|
}
|
|
public static bool IsReservedWord (String word)
|
|
{
|
|
if (String.IsNullOrEmpty(word)) return false;
|
|
if (reservedWords.Contains(word, StringComparer.OrdinalIgnoreCase)) return true;
|
|
return false;
|
|
}
|
|
public static String DelimitReservedWord (String word)
|
|
{
|
|
if (!IsReservedWord(word)) return word;
|
|
switch (reservedWordDelim)
|
|
{
|
|
case DbReservedWordDelim.None:
|
|
break;
|
|
case DbReservedWordDelim.DoubleQuotes:
|
|
word = "\"" + word + "\"";
|
|
break;
|
|
case DbReservedWordDelim.SquareBrackets:
|
|
default:
|
|
word = "[" + word + "]";
|
|
break;
|
|
}
|
|
return word;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Retrieve information about the specified Column.
|
|
public static DbColumnDataType GetColDataType (ColumnIdx column)
|
|
{
|
|
int columnIdx = (int)column - 1;
|
|
if (columnIdx < 0 || columnIdx >= columnCount) return DbColumnDataType.Unknown;
|
|
return columns[columnIdx].DataType;
|
|
}
|
|
public static short GetColNativeDataType (ColumnIdx column)
|
|
{
|
|
int columnIdx = (int)column - 1;
|
|
if (columnIdx < 0 || columnIdx >= columnCount) return 0;
|
|
return columns[columnIdx].NativeDataType;
|
|
}
|
|
public static void SetMaxTextLen (ulong maxTextLen)
|
|
{
|
|
SaxDbDfn.maxTextLen = maxTextLen;
|
|
}
|
|
public static bool IsColFmtText (ColumnIdx column)
|
|
{
|
|
int columnIdx = (int)column - 1;
|
|
if (columnIdx < 0 || columnIdx >= columnCount) return false;
|
|
return (columns[columnIdx].DataType == DbColumnDataType.VarChar);
|
|
}
|
|
public static ulong GetColTextLen (ColumnIdx column)
|
|
{
|
|
int columnIdx = (int)column - 1;
|
|
if (columnIdx < 0 || columnIdx >= columnCount) return 0;
|
|
if (columns[columnIdx].DataType == DbColumnDataType.VarChar)
|
|
{
|
|
ulong textLen = columns[columnIdx].DataLen;
|
|
if (maxTextLen > 0 && textLen > maxTextLen) textLen = maxTextLen;
|
|
return textLen;
|
|
}
|
|
return 0;
|
|
}
|
|
public static bool IsColFmtBool (ColumnIdx column)
|
|
{
|
|
int columnIdx = (int)column - 1;
|
|
if (columnIdx < 0 || columnIdx >= columnCount) return false;
|
|
return (columns[columnIdx].DataType == DbColumnDataType.Bit);
|
|
}
|
|
public static bool IsColFmtNumeric (ColumnIdx column)
|
|
{
|
|
int columnIdx = (int)column - 1;
|
|
if (columnIdx < 0 || columnIdx >= columnCount) return false;
|
|
switch (columns[columnIdx].DataType)
|
|
{
|
|
case DbColumnDataType.TinyInt:
|
|
case DbColumnDataType.SmallInt:
|
|
case DbColumnDataType.Int:
|
|
case DbColumnDataType.BigInt:
|
|
case DbColumnDataType.Single:
|
|
case DbColumnDataType.Double:
|
|
case DbColumnDataType.Decimal:
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Table definitions.
|
|
private static readonly String[] tables =
|
|
{
|
|
"ItemSport",
|
|
"JournalistArticle",
|
|
"Organisation",
|
|
"OrganisationOpportunity",
|
|
"Region",
|
|
"Sport",
|
|
"UserAccount",
|
|
"UserOrganisation",
|
|
"UserRole",
|
|
};
|
|
|
|
//-------------------------------------------------------------------
|
|
// Table column definitions.
|
|
private class ColumnDfn
|
|
{
|
|
internal TableIdx TableIdx { get; set; }
|
|
internal String Name { get; set; }
|
|
internal DbColumnDataType DataType { get; set; }
|
|
internal short NativeDataType { get; set; }
|
|
internal bool IsIdentity { get; set; }
|
|
internal ulong DataLen { get; set; }
|
|
internal ColumnDfn (int tableIdx, String name, int dataType, short nativeDataType, bool isIdentity, ulong dataLen)
|
|
{
|
|
this.TableIdx = (TableIdx)tableIdx;
|
|
this.Name = name;
|
|
this.DataType = (DbColumnDataType)dataType;
|
|
this.NativeDataType = nativeDataType;
|
|
this.IsIdentity = isIdentity;
|
|
this.DataLen = dataLen;
|
|
}
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
private static readonly ColumnDfn[] columns =
|
|
{
|
|
new ColumnDfn(1,"Id",4,4,true,10),
|
|
new ColumnDfn(1,"ItemType",3,5,false,5),
|
|
new ColumnDfn(1,"ItemId",4,4,false,10),
|
|
new ColumnDfn(1,"SportId",4,4,false,10),
|
|
new ColumnDfn(1,"ItemSportData",0,-9,false,0),
|
|
new ColumnDfn(1,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(1,"Flags",3,5,false,5),
|
|
new ColumnDfn(1,"Status",0,12,false,3),
|
|
new ColumnDfn(1,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(1,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(1,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(1,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(1,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(1,"UpdateHost",0,12,false,100),
|
|
new ColumnDfn(2,"Id",4,4,true,10),
|
|
new ColumnDfn(2,"UserAccountIdJournalist",4,4,false,10),
|
|
new ColumnDfn(2,"RegionIdPrimary",4,4,false,10),
|
|
new ColumnDfn(2,"SportIdPrimary",4,4,false,10),
|
|
new ColumnDfn(2,"Headline",0,-9,false,200),
|
|
new ColumnDfn(2,"Summary",0,-9,false,2000),
|
|
new ColumnDfn(2,"BodyData",0,-9,false,0),
|
|
new ColumnDfn(2,"PublishedAt",9,93,false,16),
|
|
new ColumnDfn(2,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(2,"Flags",3,5,false,5),
|
|
new ColumnDfn(2,"Status",0,12,false,3),
|
|
new ColumnDfn(2,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(2,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(2,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(2,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(2,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(2,"UpdateHost",0,12,false,100),
|
|
new ColumnDfn(3,"Id",4,4,true,10),
|
|
new ColumnDfn(3,"Name",0,-9,false,100),
|
|
new ColumnDfn(3,"OrganisationType",0,12,false,3),
|
|
new ColumnDfn(3,"OrganisationCategory",0,12,false,3),
|
|
new ColumnDfn(3,"RegionIdPrimary",4,4,false,10),
|
|
new ColumnDfn(3,"SportIdPrimary",4,4,false,10),
|
|
new ColumnDfn(3,"CountryIso2Code",0,12,false,2),
|
|
new ColumnDfn(3,"PhoneMain",0,-9,false,50),
|
|
new ColumnDfn(3,"PhoneAlt",0,-9,false,50),
|
|
new ColumnDfn(3,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(3,"Flags",3,5,false,5),
|
|
new ColumnDfn(3,"Status",0,12,false,3),
|
|
new ColumnDfn(3,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(3,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(3,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(3,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(3,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(3,"UpdateHost",0,12,false,100),
|
|
new ColumnDfn(4,"Id",4,4,true,10),
|
|
new ColumnDfn(4,"OrganisationId",4,4,false,10),
|
|
new ColumnDfn(4,"RegionIdPrimary",4,4,false,10),
|
|
new ColumnDfn(4,"SportIdPrimary",4,4,false,10),
|
|
new ColumnDfn(4,"Position",0,-9,false,200),
|
|
new ColumnDfn(4,"Outline",0,-9,false,2000),
|
|
new ColumnDfn(4,"OpportunityData",0,-9,false,0),
|
|
new ColumnDfn(4,"PublishedAt",9,93,false,16),
|
|
new ColumnDfn(4,"ExpiresAt",9,93,false,16),
|
|
new ColumnDfn(4,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(4,"Flags",3,5,false,5),
|
|
new ColumnDfn(4,"Status",0,12,false,3),
|
|
new ColumnDfn(4,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(4,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(4,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(4,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(4,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(4,"UpdateHost",0,12,false,100),
|
|
new ColumnDfn(5,"Id",4,4,true,10),
|
|
new ColumnDfn(5,"RegionType",3,5,false,5),
|
|
new ColumnDfn(5,"CountryIso2Code",0,12,false,2),
|
|
new ColumnDfn(5,"Name",0,-9,false,100),
|
|
new ColumnDfn(5,"Latitude",8,3,false,9),
|
|
new ColumnDfn(5,"Longitude",8,3,false,9),
|
|
new ColumnDfn(5,"RegionIdParent",4,4,false,10),
|
|
new ColumnDfn(5,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(5,"Flags",3,5,false,5),
|
|
new ColumnDfn(5,"Status",0,12,false,3),
|
|
new ColumnDfn(5,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(5,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(5,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(5,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(5,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(5,"UpdateHost",0,12,false,100),
|
|
new ColumnDfn(6,"Id",4,4,true,10),
|
|
new ColumnDfn(6,"Name",0,-9,false,100),
|
|
new ColumnDfn(6,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(6,"Flags",3,5,false,5),
|
|
new ColumnDfn(6,"Status",0,12,false,3),
|
|
new ColumnDfn(6,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(6,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(6,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(6,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(6,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(6,"UpdateHost",0,12,false,100),
|
|
new ColumnDfn(7,"Id",4,4,true,10),
|
|
new ColumnDfn(7,"EmailAddress",0,-9,false,200),
|
|
new ColumnDfn(7,"Title",0,-9,false,20),
|
|
new ColumnDfn(7,"FirstName",0,-9,false,100),
|
|
new ColumnDfn(7,"Initials",0,-9,false,10),
|
|
new ColumnDfn(7,"LastName",0,-9,false,100),
|
|
new ColumnDfn(7,"PhoneMain",0,-9,false,50),
|
|
new ColumnDfn(7,"PhoneMobile",0,-9,false,50),
|
|
new ColumnDfn(7,"PhoneAlt",0,-9,false,50),
|
|
new ColumnDfn(7,"DateOfBirth",9,93,false,16),
|
|
new ColumnDfn(7,"PasswordToken",0,12,false,32),
|
|
new ColumnDfn(7,"PasswordHashed",0,-9,false,100),
|
|
new ColumnDfn(7,"PasswordHistory",0,-9,false,0),
|
|
new ColumnDfn(7,"PasswordChangedAt",9,93,false,16),
|
|
new ColumnDfn(7,"LastLoginAt",9,93,false,16),
|
|
new ColumnDfn(7,"LastInvalidLoginAt",9,93,false,16),
|
|
new ColumnDfn(7,"InvalidLoginCount",3,5,false,5),
|
|
new ColumnDfn(7,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(7,"Flags",3,5,false,5),
|
|
new ColumnDfn(7,"Status",0,12,false,3),
|
|
new ColumnDfn(7,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(7,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(7,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(7,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(7,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(7,"UpdateHost",0,12,false,100),
|
|
new ColumnDfn(8,"Id",5,-5,true,19),
|
|
new ColumnDfn(8,"UserAccountId",4,4,false,10),
|
|
new ColumnDfn(8,"OrganisationId",4,4,false,10),
|
|
new ColumnDfn(8,"OrganisationRoleCodes",0,12,false,256),
|
|
new ColumnDfn(8,"OrganisationRoleCount",2,-6,false,3),
|
|
new ColumnDfn(8,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(8,"Flags",3,5,false,5),
|
|
new ColumnDfn(8,"Status",0,12,false,3),
|
|
new ColumnDfn(8,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(8,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(8,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(8,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(8,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(8,"UpdateHost",0,12,false,100),
|
|
new ColumnDfn(9,"Id",4,4,true,10),
|
|
new ColumnDfn(9,"UserAccountId",4,4,false,10),
|
|
new ColumnDfn(9,"UserRoleCode",0,12,false,16),
|
|
new ColumnDfn(9,"Notes",0,-9,false,2000),
|
|
new ColumnDfn(9,"Flags",3,5,false,5),
|
|
new ColumnDfn(9,"Status",0,12,false,3),
|
|
new ColumnDfn(9,"CreateOn",9,93,false,23),
|
|
new ColumnDfn(9,"CreateBy",4,4,false,10),
|
|
new ColumnDfn(9,"CreateHost",0,12,false,100),
|
|
new ColumnDfn(9,"UpdateOn",9,93,false,23),
|
|
new ColumnDfn(9,"UpdateBy",4,4,false,10),
|
|
new ColumnDfn(9,"UpdateHost",0,12,false,100),
|
|
};
|
|
|
|
//-------------------------------------------------------------------
|
|
// Reserved words.
|
|
private static readonly List<String> reservedWords = new List<String>()
|
|
{
|
|
"ADD",
|
|
"ALL",
|
|
"ALTER",
|
|
"AND",
|
|
"ANY",
|
|
"AS",
|
|
"ASC",
|
|
"AVG",
|
|
"BEGIN",
|
|
"BETWEEN",
|
|
"BY",
|
|
"CASE",
|
|
"CAST",
|
|
"COLUMN",
|
|
"COMMIT",
|
|
"CONSTRAINT",
|
|
"CONVERT",
|
|
"COUNT",
|
|
"CREATE",
|
|
"CURRENCY",
|
|
"DEFAULT",
|
|
"DELETE",
|
|
"DESC",
|
|
"DISTINCT",
|
|
"DROP",
|
|
"ELSE",
|
|
"END",
|
|
"EXECUTE",
|
|
"EXISTS",
|
|
"FALSE",
|
|
"FROM",
|
|
"GRANT",
|
|
"GROUP",
|
|
"HAVING",
|
|
"IN",
|
|
"INDEX",
|
|
"INNER",
|
|
"INSERT",
|
|
"INTO",
|
|
"IS",
|
|
"JOIN",
|
|
"KEY",
|
|
"LEFT",
|
|
"LIKE",
|
|
"MAX",
|
|
"MIN",
|
|
"NOT",
|
|
"NULL",
|
|
"ON",
|
|
"OR",
|
|
"ORDER",
|
|
"OUTER",
|
|
"OUTPUT",
|
|
"PRIMARY",
|
|
"PROCEDURE",
|
|
"REVOKE",
|
|
"ROLLBACK",
|
|
"ROWCOUNT",
|
|
"SELECT",
|
|
"SET",
|
|
"SQL",
|
|
"SUM",
|
|
"TABLE",
|
|
"THEN",
|
|
"TRANSACTION",
|
|
"TRUE",
|
|
"UNION",
|
|
"UNIQUE",
|
|
"UPDATE",
|
|
"USER",
|
|
"VALUES",
|
|
"VIEW",
|
|
"WHEN",
|
|
"WHERE",
|
|
};
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
}
|