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 Wed 8-Feb-2023 18:02:24
//---------------------------------------------------------------------------
namespace Saxonite.Base.App
{
public class SaxDbDfn_Core
{
//-------------------------------------------------------------------
// Table identifiers.
public enum TableIdx
{
Unknown = 0,
ActivityFeedback,
ActivityIndex,
Article,
ItemAddress,
ItemAssociation,
ItemImage,
ItemSport,
Organisation,
OrganisationEvent,
OrganisationOpportunity,
Region,
Sport,
UserAccount,
UserActivity,
UserConfig,
UserEligibility,
UserOnline,
UserOrganisation,
UserRole,
UserSession,
UserSport,
UserSportExperience,
}
//-------------------------------------------------------------------
// Column identifiers.
public enum ColumnIdx
{
Unknown = 0,
ActivityFeedback_ItemType,
ActivityFeedback_ItemId,
ActivityFeedback_ViewCount,
ActivityFeedback_FeedbackCount,
ActivityFeedback_FeedbackTotal,
ActivityFeedback_FeedbackAverage,
ActivityFeedback_CreateOn,
ActivityFeedback_UpdateOn,
ActivityIndex_ItemType,
ActivityIndex_ItemId,
ActivityIndex_SportId,
ActivityIndex_RegionId,
ActivityIndex_UserAccountIdOwner,
ActivityIndex_OrganisationIdOwner,
ActivityIndex_EffectiveOn,
ActivityIndex_ExpiresOn,
ActivityIndex_Notes,
ActivityIndex_Flags,
ActivityIndex_Status,
ActivityIndex_CreateOn,
ActivityIndex_CreateBy,
ActivityIndex_CreateHost,
ActivityIndex_UpdateOn,
ActivityIndex_UpdateBy,
ActivityIndex_UpdateHost,
Article_Id,
Article_UserAccountIdAuthor,
Article_OrganisationId,
Article_SportIdPrimary,
Article_RegionIdPrimary,
Article_Headline,
Article_Summary,
Article_ItemImageIdThumbnail,
Article_BodyData,
Article_PublishedAt,
Article_Notes,
Article_Flags,
Article_Status,
Article_CreateOn,
Article_CreateBy,
Article_CreateHost,
Article_UpdateOn,
Article_UpdateBy,
Article_UpdateHost,
ItemAddress_Id,
ItemAddress_ItemType,
ItemAddress_ItemId,
ItemAddress_AddressType,
ItemAddress_Caption,
ItemAddress_Line1,
ItemAddress_Line2,
ItemAddress_Line3,
ItemAddress_Town,
ItemAddress_Province,
ItemAddress_RegionIdProvince,
ItemAddress_Country,
ItemAddress_RegionIdCountry,
ItemAddress_PostalCode,
ItemAddress_PhoneMain,
ItemAddress_LocationSource,
ItemAddress_LocationStoredAt,
ItemAddress_LocationUpdateRequired,
ItemAddress_LocationData,
ItemAddress_LocationFormattedAddress,
ItemAddress_LocationLatitude,
ItemAddress_LocationLongitude,
ItemAddress_LocationAltitude,
ItemAddress_Notes,
ItemAddress_Flags,
ItemAddress_Status,
ItemAddress_CreateOn,
ItemAddress_CreateBy,
ItemAddress_CreateHost,
ItemAddress_UpdateOn,
ItemAddress_UpdateBy,
ItemAddress_UpdateHost,
ItemAssociation_Id,
ItemAssociation_ItemTypeFrom,
ItemAssociation_ItemIdFrom,
ItemAssociation_ItemTypeTo,
ItemAssociation_ItemIdTo,
ItemAssociation_AssociationType,
ItemAssociation_Notes,
ItemAssociation_Flags,
ItemAssociation_Status,
ItemAssociation_CreateOn,
ItemAssociation_CreateBy,
ItemAssociation_CreateHost,
ItemAssociation_UpdateOn,
ItemAssociation_UpdateBy,
ItemAssociation_UpdateHost,
ItemImage_Id,
ItemImage_ItemType,
ItemImage_ItemId,
ItemImage_ImageType,
ItemImage_ImageSeq,
ItemImage_SessionUid,
ItemImage_ImageUid,
ItemImage_Filename,
ItemImage_Mime,
ItemImage_ContentType,
ItemImage_Width,
ItemImage_Height,
ItemImage_ImageData,
ItemImage_Notes,
ItemImage_Flags,
ItemImage_Status,
ItemImage_CreateOn,
ItemImage_CreateBy,
ItemImage_CreateHost,
ItemImage_UpdateOn,
ItemImage_UpdateBy,
ItemImage_UpdateHost,
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,
Organisation_Id,
Organisation_Name,
Organisation_OrganisationType,
Organisation_OrganisationCategory,
Organisation_SportIdPrimary,
Organisation_RegionIdPrimary,
Organisation_About,
Organisation_Facilities,
Organisation_ContactData,
Organisation_CountryIso2Code,
Organisation_Notes,
Organisation_Flags,
Organisation_Status,
Organisation_CreateOn,
Organisation_CreateBy,
Organisation_CreateHost,
Organisation_UpdateOn,
Organisation_UpdateBy,
Organisation_UpdateHost,
OrganisationEvent_Id,
OrganisationEvent_OrganisationId,
OrganisationEvent_SportIdPrimary,
OrganisationEvent_RegionIdCountry,
OrganisationEvent_EventAt,
OrganisationEvent_EventTypeCode,
OrganisationEvent_Summary,
OrganisationEvent_Details,
OrganisationEvent_EventData,
OrganisationEvent_PublishedAt,
OrganisationEvent_ExpiresAt,
OrganisationEvent_Notes,
OrganisationEvent_Flags,
OrganisationEvent_Status,
OrganisationEvent_CreateOn,
OrganisationEvent_CreateBy,
OrganisationEvent_CreateHost,
OrganisationEvent_UpdateOn,
OrganisationEvent_UpdateBy,
OrganisationEvent_UpdateHost,
OrganisationOpportunity_Id,
OrganisationOpportunity_OrganisationId,
OrganisationOpportunity_SportIdPrimary,
OrganisationOpportunity_RegionIdPrimary,
OrganisationOpportunity_OpportunityTypeCode,
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_SportIdParent,
Sport_Name,
Sport_SpecialityLabel,
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_About,
UserAccount_PhoneMain,
UserAccount_PhoneMobile,
UserAccount_PhoneAlt,
UserAccount_Gender,
UserAccount_GenderOther,
UserAccount_DateOfBirthDay,
UserAccount_DateOfBirthMonth,
UserAccount_DateOfBirthYear,
UserAccount_RegionIdCountry,
UserAccount_RegionIdProvince,
UserAccount_JournalistData,
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,
UserActivity_Id,
UserActivity_UserAccountId,
UserActivity_ItemType,
UserActivity_ItemId,
UserActivity_CurrentlyListed,
UserActivity_ListedAtFirst,
UserActivity_ListedAtLast,
UserActivity_ViewedAtFirst,
UserActivity_ViewedAtLast,
UserActivity_Reaction,
UserActivity_ReactedAtFirst,
UserActivity_ReactedAtLast,
UserActivity_UserActivityData,
UserActivity_Notes,
UserActivity_Flags,
UserActivity_Status,
UserActivity_CreateOn,
UserActivity_CreateBy,
UserActivity_CreateHost,
UserActivity_UpdateOn,
UserActivity_UpdateBy,
UserActivity_UpdateHost,
UserConfig_Id,
UserConfig_UserAccountId,
UserConfig_ConfigType,
UserConfig_ConfigData,
UserConfig_CreateOn,
UserConfig_UpdateOn,
UserEligibility_Id,
UserEligibility_UserAccountId,
UserEligibility_RegionId,
UserEligibility_EligibilityType,
UserEligibility_Info,
UserEligibility_ExpiresOn,
UserEligibility_Notes,
UserEligibility_Flags,
UserEligibility_Status,
UserEligibility_CreateOn,
UserEligibility_CreateBy,
UserEligibility_CreateHost,
UserEligibility_UpdateOn,
UserEligibility_UpdateBy,
UserEligibility_UpdateHost,
UserOnline_UserAccountId,
UserOnline_OnlineAt,
UserOrganisation_Id,
UserOrganisation_UserAccountId,
UserOrganisation_OrganisationId,
UserOrganisation_OrganisationRoleCodes,
UserOrganisation_OrganisationRoleCount,
UserOrganisation_AdminComment,
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_LastLoginAt,
UserRole_LastInvalidLoginAt,
UserRole_InvalidLoginCount,
UserRole_Notes,
UserRole_Flags,
UserRole_Status,
UserRole_CreateOn,
UserRole_CreateBy,
UserRole_CreateHost,
UserRole_UpdateOn,
UserRole_UpdateBy,
UserRole_UpdateHost,
UserSession_UserAccountId,
UserSession_ActivityIndexIds,
UserSession_UserSessionData,
UserSession_Flags,
UserSession_CreateOn,
UserSession_UpdateOn,
UserSport_Id,
UserSport_UserAccountId,
UserSport_SportId,
UserSport_About,
UserSport_ContactsData,
UserSport_Participating,
UserSport_Preparing,
UserSport_Officiating,
UserSport_UserSportData,
UserSport_Notes,
UserSport_Flags,
UserSport_Status,
UserSport_CreateOn,
UserSport_CreateBy,
UserSport_CreateHost,
UserSport_UpdateOn,
UserSport_UpdateBy,
UserSport_UpdateHost,
UserSportExperience_Id,
UserSportExperience_UserSportId,
UserSportExperience_PeriodFrom,
UserSportExperience_PeriodTo,
UserSportExperience_OrganisationId,
UserSportExperience_OrganisationName,
UserSportExperience_Summary,
UserSportExperience_Team,
UserSportExperience_League,
UserSportExperience_Speciality,
UserSportExperience_SpecialitiesOther,
UserSportExperience_RegionIdNation,
UserSportExperience_RegionIdProvince,
UserSportExperience_Awards,
UserSportExperience_UserSportExperienceData,
UserSportExperience_Notes,
UserSportExperience_Flags,
UserSportExperience_Status,
UserSportExperience_CreateOn,
UserSportExperience_CreateBy,
UserSportExperience_CreateHost,
UserSportExperience_UpdateOn,
UserSportExperience_UpdateBy,
UserSportExperience_UpdateHost,
}
//-------------------------------------------------------------------
// Data members.
private static readonly int tableCount = 22;
private static readonly int columnCount = 371;
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: '(
.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_Core.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_Core.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 =
{
"ActivityFeedback",
"ActivityIndex",
"Article",
"ItemAddress",
"ItemAssociation",
"ItemImage",
"ItemSport",
"Organisation",
"OrganisationEvent",
"OrganisationOpportunity",
"Region",
"Sport",
"UserAccount",
"UserActivity",
"UserConfig",
"UserEligibility",
"UserOnline",
"UserOrganisation",
"UserRole",
"UserSession",
"UserSport",
"UserSportExperience",
};
//-------------------------------------------------------------------
// 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,"ItemType",3,5,false,5),
new ColumnDfn(1,"ItemId",5,-5,false,19),
new ColumnDfn(1,"ViewCount",5,-5,false,19),
new ColumnDfn(1,"FeedbackCount",5,-5,false,19),
new ColumnDfn(1,"FeedbackTotal",5,-5,false,19),
new ColumnDfn(1,"FeedbackAverage",8,3,false,9),
new ColumnDfn(1,"CreateOn",9,93,false,23),
new ColumnDfn(1,"UpdateOn",9,93,false,23),
new ColumnDfn(2,"ItemType",3,5,false,5),
new ColumnDfn(2,"ItemId",5,-5,false,19),
new ColumnDfn(2,"SportId",4,4,false,10),
new ColumnDfn(2,"RegionId",4,4,false,10),
new ColumnDfn(2,"UserAccountIdOwner",4,4,false,10),
new ColumnDfn(2,"OrganisationIdOwner",4,4,false,10),
new ColumnDfn(2,"EffectiveOn",9,93,false,16),
new ColumnDfn(2,"ExpiresOn",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,"UserAccountIdAuthor",4,4,false,10),
new ColumnDfn(3,"OrganisationId",4,4,false,10),
new ColumnDfn(3,"SportIdPrimary",4,4,false,10),
new ColumnDfn(3,"RegionIdPrimary",4,4,false,10),
new ColumnDfn(3,"Headline",0,-9,false,200),
new ColumnDfn(3,"Summary",0,-9,false,2000),
new ColumnDfn(3,"ItemImageIdThumbnail",4,4,false,10),
new ColumnDfn(3,"BodyData",0,-9,false,0),
new ColumnDfn(3,"PublishedAt",9,93,false,16),
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",5,-5,true,19),
new ColumnDfn(4,"ItemType",3,5,false,5),
new ColumnDfn(4,"ItemId",4,4,false,10),
new ColumnDfn(4,"AddressType",3,5,false,5),
new ColumnDfn(4,"Caption",0,-9,false,200),
new ColumnDfn(4,"Line1",0,-9,false,200),
new ColumnDfn(4,"Line2",0,-9,false,200),
new ColumnDfn(4,"Line3",0,-9,false,200),
new ColumnDfn(4,"Town",0,-9,false,100),
new ColumnDfn(4,"Province",0,-9,false,100),
new ColumnDfn(4,"RegionIdProvince",4,4,false,10),
new ColumnDfn(4,"Country",0,-9,false,100),
new ColumnDfn(4,"RegionIdCountry",4,4,false,10),
new ColumnDfn(4,"PostalCode",0,-9,false,32),
new ColumnDfn(4,"PhoneMain",0,-9,false,100),
new ColumnDfn(4,"LocationSource",0,12,false,100),
new ColumnDfn(4,"LocationStoredAt",9,93,false,16),
new ColumnDfn(4,"LocationUpdateRequired",1,-7,false,1),
new ColumnDfn(4,"LocationData",0,-9,false,4000),
new ColumnDfn(4,"LocationFormattedAddress",0,-9,false,4000),
new ColumnDfn(4,"LocationLatitude",8,3,false,9),
new ColumnDfn(4,"LocationLongitude",8,3,false,9),
new ColumnDfn(4,"LocationAltitude",8,3,false,9),
new ColumnDfn(4,"Notes",0,-9,false,2000),
new ColumnDfn(4,"Flags",3,5,false,5),
new ColumnDfn(4,"Status",0,1,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",5,-5,true,19),
new ColumnDfn(5,"ItemTypeFrom",3,5,false,5),
new ColumnDfn(5,"ItemIdFrom",4,4,false,10),
new ColumnDfn(5,"ItemTypeTo",3,5,false,5),
new ColumnDfn(5,"ItemIdTo",4,4,false,10),
new ColumnDfn(5,"AssociationType",3,5,false,5),
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",5,-5,true,19),
new ColumnDfn(6,"ItemType",3,5,false,5),
new ColumnDfn(6,"ItemId",4,4,false,10),
new ColumnDfn(6,"ImageType",3,5,false,5),
new ColumnDfn(6,"ImageSeq",2,-6,false,3),
new ColumnDfn(6,"SessionUid",5,-5,false,19),
new ColumnDfn(6,"ImageUid",4,4,false,10),
new ColumnDfn(6,"Filename",0,-9,false,1024),
new ColumnDfn(6,"Mime",0,12,false,64),
new ColumnDfn(6,"ContentType",0,12,false,128),
new ColumnDfn(6,"Width",4,4,false,10),
new ColumnDfn(6,"Height",4,4,false,10),
new ColumnDfn(6,"ImageData",10,-3,false,0),
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,"ItemType",3,5,false,5),
new ColumnDfn(7,"ItemId",4,4,false,10),
new ColumnDfn(7,"SportId",4,4,false,10),
new ColumnDfn(7,"ItemSportData",0,-9,false,0),
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",4,4,true,10),
new ColumnDfn(8,"Name",0,-9,false,100),
new ColumnDfn(8,"OrganisationType",0,12,false,3),
new ColumnDfn(8,"OrganisationCategory",0,12,false,3),
new ColumnDfn(8,"SportIdPrimary",4,4,false,10),
new ColumnDfn(8,"RegionIdPrimary",4,4,false,10),
new ColumnDfn(8,"About",0,-9,false,2000),
new ColumnDfn(8,"Facilities",0,-9,false,2000),
new ColumnDfn(8,"ContactData",0,-9,false,0),
new ColumnDfn(8,"CountryIso2Code",0,12,false,2),
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,"OrganisationId",4,4,false,10),
new ColumnDfn(9,"SportIdPrimary",4,4,false,10),
new ColumnDfn(9,"RegionIdCountry",4,4,false,10),
new ColumnDfn(9,"EventAt",9,93,false,16),
new ColumnDfn(9,"EventTypeCode",0,12,false,3),
new ColumnDfn(9,"Summary",0,-9,false,200),
new ColumnDfn(9,"Details",0,-9,false,2000),
new ColumnDfn(9,"EventData",0,-9,false,0),
new ColumnDfn(9,"PublishedAt",9,93,false,16),
new ColumnDfn(9,"ExpiresAt",9,93,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),
new ColumnDfn(10,"Id",4,4,true,10),
new ColumnDfn(10,"OrganisationId",4,4,false,10),
new ColumnDfn(10,"SportIdPrimary",4,4,false,10),
new ColumnDfn(10,"RegionIdPrimary",4,4,false,10),
new ColumnDfn(10,"OpportunityTypeCode",0,12,false,3),
new ColumnDfn(10,"Position",0,-9,false,200),
new ColumnDfn(10,"Outline",0,-9,false,2000),
new ColumnDfn(10,"OpportunityData",0,-9,false,0),
new ColumnDfn(10,"PublishedAt",9,93,false,16),
new ColumnDfn(10,"ExpiresAt",9,93,false,16),
new ColumnDfn(10,"Notes",0,-9,false,2000),
new ColumnDfn(10,"Flags",3,5,false,5),
new ColumnDfn(10,"Status",0,12,false,3),
new ColumnDfn(10,"CreateOn",9,93,false,23),
new ColumnDfn(10,"CreateBy",4,4,false,10),
new ColumnDfn(10,"CreateHost",0,12,false,100),
new ColumnDfn(10,"UpdateOn",9,93,false,23),
new ColumnDfn(10,"UpdateBy",4,4,false,10),
new ColumnDfn(10,"UpdateHost",0,12,false,100),
new ColumnDfn(11,"Id",4,4,true,10),
new ColumnDfn(11,"RegionType",3,5,false,5),
new ColumnDfn(11,"CountryIso2Code",0,12,false,2),
new ColumnDfn(11,"Name",0,-9,false,100),
new ColumnDfn(11,"Latitude",8,3,false,9),
new ColumnDfn(11,"Longitude",8,3,false,9),
new ColumnDfn(11,"RegionIdParent",4,4,false,10),
new ColumnDfn(11,"Notes",0,-9,false,2000),
new ColumnDfn(11,"Flags",3,5,false,5),
new ColumnDfn(11,"Status",0,12,false,3),
new ColumnDfn(11,"CreateOn",9,93,false,23),
new ColumnDfn(11,"CreateBy",4,4,false,10),
new ColumnDfn(11,"CreateHost",0,12,false,100),
new ColumnDfn(11,"UpdateOn",9,93,false,23),
new ColumnDfn(11,"UpdateBy",4,4,false,10),
new ColumnDfn(11,"UpdateHost",0,12,false,100),
new ColumnDfn(12,"Id",4,4,true,10),
new ColumnDfn(12,"SportIdParent",4,4,false,10),
new ColumnDfn(12,"Name",0,-9,false,100),
new ColumnDfn(12,"SpecialityLabel",3,5,false,5),
new ColumnDfn(12,"Notes",0,-9,false,2000),
new ColumnDfn(12,"Flags",3,5,false,5),
new ColumnDfn(12,"Status",0,12,false,3),
new ColumnDfn(12,"CreateOn",9,93,false,23),
new ColumnDfn(12,"CreateBy",4,4,false,10),
new ColumnDfn(12,"CreateHost",0,12,false,100),
new ColumnDfn(12,"UpdateOn",9,93,false,23),
new ColumnDfn(12,"UpdateBy",4,4,false,10),
new ColumnDfn(12,"UpdateHost",0,12,false,100),
new ColumnDfn(13,"Id",4,4,true,10),
new ColumnDfn(13,"EmailAddress",0,-9,false,200),
new ColumnDfn(13,"Title",0,-9,false,20),
new ColumnDfn(13,"FirstName",0,-9,false,100),
new ColumnDfn(13,"Initials",0,-9,false,10),
new ColumnDfn(13,"LastName",0,-9,false,100),
new ColumnDfn(13,"About",0,-9,false,2000),
new ColumnDfn(13,"PhoneMain",0,-9,false,50),
new ColumnDfn(13,"PhoneMobile",0,-9,false,50),
new ColumnDfn(13,"PhoneAlt",0,-9,false,50),
new ColumnDfn(13,"Gender",2,-6,false,3),
new ColumnDfn(13,"GenderOther",0,-9,false,50),
new ColumnDfn(13,"DateOfBirthDay",2,-6,false,3),
new ColumnDfn(13,"DateOfBirthMonth",2,-6,false,3),
new ColumnDfn(13,"DateOfBirthYear",3,5,false,5),
new ColumnDfn(13,"RegionIdCountry",4,4,false,10),
new ColumnDfn(13,"RegionIdProvince",4,4,false,10),
new ColumnDfn(13,"JournalistData",0,-9,false,0),
new ColumnDfn(13,"PasswordToken",0,12,false,32),
new ColumnDfn(13,"PasswordHashed",0,-9,false,100),
new ColumnDfn(13,"PasswordHistory",0,-9,false,0),
new ColumnDfn(13,"PasswordChangedAt",9,93,false,16),
new ColumnDfn(13,"LastLoginAt",9,93,false,16),
new ColumnDfn(13,"LastInvalidLoginAt",9,93,false,16),
new ColumnDfn(13,"InvalidLoginCount",3,5,false,5),
new ColumnDfn(13,"Notes",0,-9,false,2000),
new ColumnDfn(13,"Flags",3,5,false,5),
new ColumnDfn(13,"Status",0,12,false,3),
new ColumnDfn(13,"CreateOn",9,93,false,23),
new ColumnDfn(13,"CreateBy",4,4,false,10),
new ColumnDfn(13,"CreateHost",0,12,false,100),
new ColumnDfn(13,"UpdateOn",9,93,false,23),
new ColumnDfn(13,"UpdateBy",4,4,false,10),
new ColumnDfn(13,"UpdateHost",0,12,false,100),
new ColumnDfn(14,"Id",5,-5,true,19),
new ColumnDfn(14,"UserAccountId",4,4,false,10),
new ColumnDfn(14,"ItemType",3,5,false,5),
new ColumnDfn(14,"ItemId",5,-5,false,19),
new ColumnDfn(14,"CurrentlyListed",1,-7,false,1),
new ColumnDfn(14,"ListedAtFirst",9,93,false,16),
new ColumnDfn(14,"ListedAtLast",9,93,false,16),
new ColumnDfn(14,"ViewedAtFirst",9,93,false,16),
new ColumnDfn(14,"ViewedAtLast",9,93,false,16),
new ColumnDfn(14,"Reaction",3,5,false,5),
new ColumnDfn(14,"ReactedAtFirst",9,93,false,16),
new ColumnDfn(14,"ReactedAtLast",9,93,false,16),
new ColumnDfn(14,"UserActivityData",0,-9,false,0),
new ColumnDfn(14,"Notes",0,-9,false,2000),
new ColumnDfn(14,"Flags",3,5,false,5),
new ColumnDfn(14,"Status",0,12,false,3),
new ColumnDfn(14,"CreateOn",9,93,false,23),
new ColumnDfn(14,"CreateBy",4,4,false,10),
new ColumnDfn(14,"CreateHost",0,12,false,100),
new ColumnDfn(14,"UpdateOn",9,93,false,23),
new ColumnDfn(14,"UpdateBy",4,4,false,10),
new ColumnDfn(14,"UpdateHost",0,12,false,100),
new ColumnDfn(15,"Id",5,-5,true,19),
new ColumnDfn(15,"UserAccountId",4,4,false,10),
new ColumnDfn(15,"ConfigType",3,5,false,5),
new ColumnDfn(15,"ConfigData",0,-9,false,0),
new ColumnDfn(15,"CreateOn",9,93,false,23),
new ColumnDfn(15,"UpdateOn",9,93,false,23),
new ColumnDfn(16,"Id",5,-5,true,19),
new ColumnDfn(16,"UserAccountId",4,4,false,10),
new ColumnDfn(16,"RegionId",4,4,false,10),
new ColumnDfn(16,"EligibilityType",3,5,false,5),
new ColumnDfn(16,"Info",0,-9,false,2000),
new ColumnDfn(16,"ExpiresOn",9,93,false,16),
new ColumnDfn(16,"Notes",0,-9,false,2000),
new ColumnDfn(16,"Flags",3,5,false,5),
new ColumnDfn(16,"Status",0,12,false,3),
new ColumnDfn(16,"CreateOn",9,93,false,23),
new ColumnDfn(16,"CreateBy",4,4,false,10),
new ColumnDfn(16,"CreateHost",0,12,false,100),
new ColumnDfn(16,"UpdateOn",9,93,false,23),
new ColumnDfn(16,"UpdateBy",4,4,false,10),
new ColumnDfn(16,"UpdateHost",0,12,false,100),
new ColumnDfn(17,"UserAccountId",4,4,false,10),
new ColumnDfn(17,"OnlineAt",9,93,false,16),
new ColumnDfn(18,"Id",5,-5,true,19),
new ColumnDfn(18,"UserAccountId",4,4,false,10),
new ColumnDfn(18,"OrganisationId",4,4,false,10),
new ColumnDfn(18,"OrganisationRoleCodes",0,12,false,256),
new ColumnDfn(18,"OrganisationRoleCount",2,-6,false,3),
new ColumnDfn(18,"AdminComment",0,-9,false,2000),
new ColumnDfn(18,"Notes",0,-9,false,2000),
new ColumnDfn(18,"Flags",3,5,false,5),
new ColumnDfn(18,"Status",0,12,false,3),
new ColumnDfn(18,"CreateOn",9,93,false,23),
new ColumnDfn(18,"CreateBy",4,4,false,10),
new ColumnDfn(18,"CreateHost",0,12,false,100),
new ColumnDfn(18,"UpdateOn",9,93,false,23),
new ColumnDfn(18,"UpdateBy",4,4,false,10),
new ColumnDfn(18,"UpdateHost",0,12,false,100),
new ColumnDfn(19,"Id",5,-5,true,19),
new ColumnDfn(19,"UserAccountId",4,4,false,10),
new ColumnDfn(19,"UserRoleCode",0,12,false,16),
new ColumnDfn(19,"LastLoginAt",9,93,false,16),
new ColumnDfn(19,"LastInvalidLoginAt",9,93,false,16),
new ColumnDfn(19,"InvalidLoginCount",3,5,false,5),
new ColumnDfn(19,"Notes",0,-9,false,2000),
new ColumnDfn(19,"Flags",3,5,false,5),
new ColumnDfn(19,"Status",0,12,false,3),
new ColumnDfn(19,"CreateOn",9,93,false,23),
new ColumnDfn(19,"CreateBy",4,4,false,10),
new ColumnDfn(19,"CreateHost",0,12,false,100),
new ColumnDfn(19,"UpdateOn",9,93,false,23),
new ColumnDfn(19,"UpdateBy",4,4,false,10),
new ColumnDfn(19,"UpdateHost",0,12,false,100),
new ColumnDfn(20,"UserAccountId",4,4,false,10),
new ColumnDfn(20,"ActivityIndexIds",0,-9,false,0),
new ColumnDfn(20,"UserSessionData",0,-9,false,0),
new ColumnDfn(20,"Flags",3,5,false,5),
new ColumnDfn(20,"CreateOn",9,93,false,23),
new ColumnDfn(20,"UpdateOn",9,93,false,23),
new ColumnDfn(21,"Id",5,-5,true,19),
new ColumnDfn(21,"UserAccountId",4,4,false,10),
new ColumnDfn(21,"SportId",4,4,false,10),
new ColumnDfn(21,"About",0,-9,false,2000),
new ColumnDfn(21,"ContactsData",0,-9,false,0),
new ColumnDfn(21,"Participating",3,5,false,5),
new ColumnDfn(21,"Preparing",3,5,false,5),
new ColumnDfn(21,"Officiating",3,5,false,5),
new ColumnDfn(21,"UserSportData",0,-9,false,0),
new ColumnDfn(21,"Notes",0,-9,false,2000),
new ColumnDfn(21,"Flags",3,5,false,5),
new ColumnDfn(21,"Status",0,12,false,3),
new ColumnDfn(21,"CreateOn",9,93,false,23),
new ColumnDfn(21,"CreateBy",4,4,false,10),
new ColumnDfn(21,"CreateHost",0,12,false,100),
new ColumnDfn(21,"UpdateOn",9,93,false,23),
new ColumnDfn(21,"UpdateBy",4,4,false,10),
new ColumnDfn(21,"UpdateHost",0,12,false,100),
new ColumnDfn(22,"Id",5,-5,true,19),
new ColumnDfn(22,"UserSportId",5,-5,false,19),
new ColumnDfn(22,"PeriodFrom",9,93,false,16),
new ColumnDfn(22,"PeriodTo",9,93,false,16),
new ColumnDfn(22,"OrganisationId",4,4,false,10),
new ColumnDfn(22,"OrganisationName",0,-9,false,200),
new ColumnDfn(22,"Summary",0,-9,false,2000),
new ColumnDfn(22,"Team",0,-9,false,64),
new ColumnDfn(22,"League",0,-9,false,64),
new ColumnDfn(22,"Speciality",0,-9,false,64),
new ColumnDfn(22,"SpecialitiesOther",0,-9,false,1000),
new ColumnDfn(22,"RegionIdNation",4,4,false,10),
new ColumnDfn(22,"RegionIdProvince",4,4,false,10),
new ColumnDfn(22,"Awards",0,-9,false,2000),
new ColumnDfn(22,"UserSportExperienceData",0,-9,false,0),
new ColumnDfn(22,"Notes",0,-9,false,2000),
new ColumnDfn(22,"Flags",3,5,false,5),
new ColumnDfn(22,"Status",0,12,false,3),
new ColumnDfn(22,"CreateOn",9,93,false,23),
new ColumnDfn(22,"CreateBy",4,4,false,10),
new ColumnDfn(22,"CreateHost",0,12,false,100),
new ColumnDfn(22,"UpdateOn",9,93,false,23),
new ColumnDfn(22,"UpdateBy",4,4,false,10),
new ColumnDfn(22,"UpdateHost",0,12,false,100),
};
//-------------------------------------------------------------------
// Reserved words.
private static readonly List reservedWords = new List()
{
"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",
};
//-------------------------------------------------------------------
}
}