Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
Types.hpp
1 //
2 // (C) Copyright 2001-2016 Software and Services LLC, All Rights Reserved.
3 //
4 // NOTICE:
5 //
6 // THIS SOURCE CODE BELONGS TO SOFTWARE AND SERVICES LIMITED LIABILITY
7 // CORPORATION, AN IDAHO CORPORATION. THIS CODE IS CONSIDERED A
8 // TRADE SECRET AND IS NOT TO BE DIVULGED OR USED BY PARTIES WHO HAVE
9 // NOT RECEIVED WRITTEN AUTHORIZATION FROM THE OWNER.
10 //
11 // THIS SOURCE CODE IS UNPUBLISHED WORK FULLY PROTECTED BY THE UNITED
12 // STATES COPYRIGHT LAWS AND IS CONSIDERED A TRADE SECRET BELONGING
13 // TO THE COPYRIGHT HOLDER.
14 //
15 // THIS SOFTWARE AND MANUAL ARE BOTH PROTECTED BY UNITED STATES
16 // COPYRIGHT LAW (TITLE 17 UNITED STATES CODE). UNAUTHORIZED REPRODUCTION
17 // AND/OR SALE MAY RESULT IN IMPRISONMENT OF UP TO ONE YEAR AND FINES
18 // OF UP TO $100,000 (17 USC 506). COPYRIGHT INFRINGERS MAY ALSO
19 // BE SUBJECT TO CIVIL LIABILITY.
20 //
21 // ALL OF THIS CODE IS ORIGINAL WORK BY THE COPYRIGHT HOLDER.
22 //
23 
24 #ifndef _DOUGLAS_MARK_ROYER_SQL_TOOLS_TYPES_H_
25 #define _DOUGLAS_MARK_ROYER_SQL_TOOLS_TYPES_H_
26 
27 #include <map>
28 #include <list>
29 #include <vector>
30 #include <deque>
31 
32 #ifdef BUILDING_LIBRARY_SQL
33 #include "SQL.hpp"
34 #else
35 #include <SaS/Sql/SQL.hpp>
36 #endif
37 
38 namespace SoftwareAndServices
39 {
40  namespace Library
41  {
42  namespace Database
43  {
44  class SqlColumnForeignKey;
45  class SqlColumn;
46 
47  enum SqlOpts_e {
48  OptNone = 0,
49  OptNoOnly,
50  OptOnly,
51  OptNoTrusted,
52  OptTrusted,
53  OptNoProcedural,
54  OptProcedural,
55  OptNoReplace,
56  OptReplace,
57  OptSql,
58  OptAll,
59  OptDistinct,
60  OptDistinctExpr
61  };
62 
63  enum SqlArgMode_e {
64  IN_Mode,
65  OUT_Mode,
66  INOUT_Mode,
67  VARIADIC_Mode
68  };
69 
70  enum SqlCascadeRevoke_e {
71  SqlCascade,
72  SqlRestrict
73  };
74 
75  enum SqlGrant_e {
76  SqlGrantList = 0,
77  SqlGrantNone = 1,
78  SqlGrantInsert,
79  SqlGrantUpdate,
80  SqlGrantDelete,
81  SqlGrantTruncate,
82  SqlGrantReferences,
83  SqlGrantTrigger,
84  SqlGrantSelect,
85  SqlGrantConnect,
86  SqlGrantTemporary,
87  SqlGrantExecute,
88  SqlGrantCreate,
89  SqlGrantPrivileges,
90  SqlGrantUsage,
91  SqlGrantAll
92  };
93 
94  enum SqlSortOrder_e {
95  SortAsc = 0,
96  SortDesc
97  };
98 
99  enum SqlGlobalOrLocal_e {
100  GlNotSpecified = 0,
101  GlGlobal,
102  GlLocal
103  };
104 
105  enum SqlCommentTypes_e {
106  SqlCommentAggregate = 0,
107  SqlCommentCast,
108  SqlCommentCollation,
109  SqlCommentColumn,
110  SqlCommentConstraint,
111  SqlCommentConstraintDomain,
112  SqlCommentConversion,
113  SqlCommentDatabase,
114  SqlCommentDomain,
115  SqlCommentExtension,
116  SqlCommentEventTrigger,
117  SqlCommentForeignDataWrapper,
118  SqlCommentForeignTable,
119  SqlCommentFunction,
120  SqlCommentLanguage,
121  SqlCommentIndex,
122  SqlCommentLargeObject,
123  SqlCommentMaterializedView,
124  SqlCommentOperator,
125  SqlCommentOperatorClass,
126  SqlCommentOperatorFamily,
127  SqlCommentPolicy,
128  SqlCommentRole,
129  SqlCommentRule,
130  SqlCommentSchema,
131  SqlCommentSequence,
132  SqlCommentServer,
133  SqlCommentTable,
134  SqlCommentTableSpace,
135  SqlCommentTextSearchConfiguration,
136  SqlCommentTextSearchDictionary,
137  SqlCommentTextSearchParser,
138  SqlCommentTextSearchTemplate,
139  SqlCommentTransformFor,
140  SqlCommentTrigger,
141  SqlCommentType,
142  SqlCommentView
143  };
144 
145  enum SqlSetScope_e {
146  SetSession = 0,
147  SetLocal
148  };
149 
150  enum SqlColAttribute_e {
151  ColAttrNotNull = 0,
152  ColAttrNull,
153  ColAttrDefStr,
154  ColAttrDefNum,
155  ColAttrDefFloat,
156  ColAttrDefBool,
157  ColAttrAutoInc,
158  ColAttrUniqueKey,
159  ColAttrPrimaryKey,
160  ColAttrComment
161  };
162 
163  enum SqlFkMatchType_e {
164  FkMatchFull = 0,
165  FkMatchPartial,
166  FkMatchSimple
167  };
168 
169  enum SqlFkActionType_e {
170  FkUpdate = 0,
171  FkDelete
172  };
173 
174  enum SqlFkAction_e {
175  FkNoAction = 0,
176  FkRestrict,
177  FkCascade,
178  FkSetNull,
179  FkSetDefault
180  };
181 
182  enum SqlExprOps_e {
183  SqlOpAdd = 0,
184  SqlOpSub = 1,
185  SqlOpMul = 2,
186  SqlOpDiv = 3,
187  SqlOpMod = 4,
188  SqlOpNeg = 5,
189  SqlOpAnd = 6,
190  SqlOpOr = 7,
191  SqlOpXor = 8,
192  SqlOpBitOr = 9,
193  SqlOpBitAnd = 10,
194  SqlOpBitXor = 11,
195  SqlOpShift = 12,
196  SqlOpNot = 13,
197  SqlOpAssign = 14,
198  SqlOpIsNull = 15,
199  SqlOpShr = 16,
200  SqlOpShl = 17,
201  SqlOpBetween = 18,
202  SqlOpExists = 19,
203  SqlOpInSelect = 20,
204  SqlOpLike = 21,
205  SqlOpRegex = 22,
206  SqlOpStrToBin = 23
207  };
208 
209  enum SqlDateIntervals_e {
210  SqlTimeDayHour = 0,
211  SqlTimeDayMicroSecond = 1,
212  SqlTimeDayMinute = 2,
213  SqlTimeDaySecond = 3,
214  SqlTimeYearMonth = 4,
215  SqlTimeHourMicroSecond = 5,
216  SqlTimeHourMinute = 6,
217  SqlTimeHourSecond = 7,
218  SqlTimeYear = 8
219  };
220 
224  enum ErrorCode_e {
225 
229  successful_completion,
234  warning,
235  dynamic_result_sets_returned,
236  implicit_zero_bit_padding,
237  null_value_eliminated_in_set_function,
238  privilege_not_granted,
239  privilege_not_revoked,
240  string_data_right_truncation_warning,
241  deprecated_feature,
246  no_data,
247  no_additional_dynamic_result_sets_returned,
252  sql_statement_not_yet_complete,
257  connection_exception,
258  connection_does_not_exist,
259  connection_failure,
260  sqlclient_unable_to_establish_sqlconnection,
261  sqlserver_rejected_establishment_of_sqlconnection,
262  transaction_resolution_unknown,
263  protocol_violation,
268  triggered_action_exception,
273  feature_not_supported,
278  invalid_transaction_initiation,
283  locator_exception,
284  invalid_locator_specification,
289  invalid_grantor,
290  invalid_grant_operation,
295  invalid_role_specification,
300  diagnostics_exception,
301  stacked_diagnostics_accessed_without_active_handler,
306  case_not_found,
311  cardinality_violation,
316  data_exception,
317  array_subscript_error,
318  character_not_in_repertoire,
319  datetime_field_overflow,
320  division_by_zero,
321  error_in_assignment,
322  escape_character_conflict,
323  indicator_overflow,
324  interval_field_overflow,
325  invalid_argument_for_logarithm,
326  invalid_argument_for_ntile_function,
327  invalid_argument_for_nth_value_function,
328  invalid_argument_for_power_function,
329  invalid_argument_for_width_bucket_function,
330  invalid_character_value_for_cast,
331  invalid_datetime_format,
332  invalid_escape_character,
333  invalid_escape_octet,
334  invalid_escape_sequence,
335  nonstandard_use_of_escape_character,
336  invalid_indicator_parameter_value,
337  invalid_parameter_value,
338  invalid_regular_expression,
339  invalid_row_count_in_limit_clause,
340  invalid_row_count_in_result_offset_clause,
341  invalid_tablesample_argument,
342  invalid_tablesample_repeat,
343  invalid_time_zone_displacement_value,
344  invalid_use_of_escape_character,
345  most_specific_type_mismatch,
346  null_value_not_allowed_data,
347  null_value_no_indicator_parameter,
348  numeric_value_out_of_range,
349  string_data_length_mismatch,
350  string_data_right_truncation_data,
351  substring_error,
352  trim_error,
353  unterminated_c_string,
354  zero_length_character_string,
355  floating_point_exception,
356  invalid_text_representation,
357  invalid_binary_representation,
358  bad_copy_file_format,
359  untranslatable_character,
360  not_an_xml_document,
361  invalid_xml_document,
362  invalid_xml_content,
363  invalid_xml_comment,
364  invalid_xml_processing_instruction,
369  integrity_constraint_violation,
370  restrict_violation,
371  not_null_violation,
372  foreign_key_violation,
373  unique_violation,
374  check_violation,
375  exclusion_violation,
380  invalid_cursor_state,
385  invalid_transaction_state,
386  active_sql_transaction,
387  branch_transaction_already_active,
388  held_cursor_requires_same_isolation_level,
389  inappropriate_access_mode_for_branch_transaction,
390  inappropriate_isolation_level_for_branch_transaction,
391  no_active_sql_transaction_for_branch_transaction,
392  read_only_sql_transaction,
393  schema_and_data_statement_mixing_not_supported,
394  no_active_sql_transaction,
395  in_failed_sql_transaction,
400  invalid_sql_statement_name,
405  triggered_data_change_violation,
410  invalid_authorization_specification,
411  invalid_password,
416  dependent_privilege_descriptors_still_exist,
417  dependent_objects_still_exist,
422  invalid_transaction_termination,
427  sql_routine_exception,
428  function_executed_no_return_statement,
429  modifying_sql_data_not_permitted_sql_routine,
430  prohibited_sql_statement_attempted_sql_routine,
431  reading_sql_data_not_permitted_sql_routine,
436  invalid_cursor_name,
441  external_routine_exception,
442  containing_sql_not_permitted,
443  modifying_sql_data_not_permitted_external,
444  prohibited_sql_statement_attempted_external,
445  reading_sql_data_not_permitted_external,
450  external_routine_invocation_exception,
451  invalid_sqlstate_returned,
452  null_value_not_allowed_external,
453  trigger_protocol_violated,
454  srf_protocol_violated,
455  event_trigger_protocol_violated,
460  savepoint_exception,
461  invalid_savepoint_specification,
466  invalid_catalog_name,
471  invalid_schema_name,
476  transaction_rollback,
477  transaction_integrity_constraint_violation,
478  serialization_failure,
479  statement_completion_unknown,
480  deadlock_detected,
485  syntax_error_or_access_rule_violation,
486  syntax_error,
487  insufficient_privilege,
488  cannot_coerce,
489  grouping_error,
490  windowing_error,
491  invalid_recursion,
492  invalid_foreign_key,
493  invalid_name,
494  name_too_long,
495  reserved_name,
496  datatype_mismatch,
497  indeterminate_datatype,
498  collation_mismatch,
499  indeterminate_collation,
500  wrong_object_type,
501  undefined_column,
502  undefined_function,
503  undefined_table,
504  undefined_parameter,
505  undefined_object,
506  duplicate_column,
507  duplicate_cursor,
508  duplicate_database,
509  duplicate_function,
510  duplicate_prepared_statement,
511  duplicate_schema,
512  duplicate_table,
513  duplicate_alias,
514  duplicate_object,
515  ambiguous_column,
516  ambiguous_function,
517  ambiguous_parameter,
518  ambiguous_alias,
519  invalid_column_reference,
520  invalid_column_definition,
521  invalid_cursor_definition,
522  invalid_database_definition,
523  invalid_function_definition,
524  invalid_prepared_statement_definition,
525  invalid_schema_definition,
526  invalid_table_definition,
527  invalid_object_definition,
532  with_check_option_violation,
537  insufficient_resources,
538  disk_full,
539  out_of_memory,
540  too_many_connections,
541  configuration_limit_exceeded,
546  program_limit_exceeded,
547  statement_too_complex,
548  too_many_columns,
549  too_many_arguments,
554  object_not_in_prerequisite_state,
555  object_in_use,
556  cant_change_runtime_param,
557  lock_not_available,
562  operator_intervention,
563  query_canceled,
564  admin_shutdown,
565  crash_shutdown,
566  cannot_connect_now,
567  database_dropped,
572  system_error,
573  io_error,
574  undefined_file,
575  duplicate_file,
580  config_file_error,
581  lock_file_exists,
586  fdw_error,
587  fdw_column_name_not_found,
588  fdw_dynamic_parameter_value_needed,
589  fdw_function_sequence_error,
590  fdw_inconsistent_descriptor_information,
591  fdw_invalid_attribute_value,
592  fdw_invalid_column_name,
593  fdw_invalid_column_number,
594  fdw_invalid_data_type,
595  fdw_invalid_data_type_descriptors,
596  fdw_invalid_descriptor_field_identifier,
597  fdw_invalid_handle,
598  fdw_invalid_option_index,
599  fdw_invalid_option_name,
600  fdw_invalid_string_length_or_buffer_length,
601  fdw_invalid_string_format,
602  fdw_invalid_use_of_null_pointer,
603  fdw_too_many_handles,
604  fdw_out_of_memory,
605  fdw_no_schemas,
606  fdw_option_name_not_found,
607  fdw_reply_handle,
608  fdw_schema_not_found,
609  fdw_table_not_found,
610  fdw_unable_to_create_execution,
611  fdw_unable_to_create_reply,
612  fdw_unable_to_establish_connection,
617  plpgsql_error,
618  raise_exception,
619  no_data_found,
620  too_many_rows,
621  assert_failure,
626  internal_error,
627  data_corrupted,
628  index_corrupted
629  };
630 
637  : public instance<SqlColumnUnique>
638  {
639 
640  public:
641 
645  SqlColumnUnique();
646 
652  SqlColumnUnique(const char * CName);
653 
659  SqlColumnUnique(const SqlColumnUnique & CopyFrom);
660 
664  virtual ~SqlColumnUnique();
665 
670  const char * Name;
671 
675  std::vector<SqlColumn*> * Columns;
676  };
677 
684  : public instance<SqlColumnPrimaryKey>
685  {
686 
687  public:
688 
693 
699  SqlColumnPrimaryKey(const char * CName);
700 
706  SqlColumnPrimaryKey(const SqlColumnPrimaryKey & CopyFrom);
707 
711  virtual ~SqlColumnPrimaryKey();
712 
717  const char * Name;
718 
722  std::vector<SqlColumn*> * Columns;
723  };
724 
730  {
731  public:
732 
737 
744  SqlColumnAttributes(const SqlColumnAttributes & CopyFrom);
745 
749  virtual ~SqlColumnAttributes();
750 
755  DefaultNone,
756  DefaultIsString,
757  DefaultIsInt,
758  DefaultIsDouble,
759  DefaultIsBool,
760  DefaultIsNow
761  };
762 
767 
771  const char * DefaultString;
772 
777  const char * DefaultSequenceName;
778 
782  long long DefaultInt;
783 
787  long double DefaultDouble;
788 
793 
798 
803 
810  bool IsUnique;
811 
817 
822 
826  void ClearDefaults();
827 
835  bool operator==(const SqlColumnAttributes & Other);
836 
845  bool operator!=(const SqlColumnAttributes & Other);
846 
855 
864 
865  };
866 
867  class DataTypeBase;
868  class SqlTable;
869  class SqlColumn;
870 
876  : public instance<SqlColumnForeignKey>
877  {
878  public:
879 
884 
891  SqlColumnForeignKey(const SqlColumnForeignKey & CopyFrom);
892 
896  virtual ~SqlColumnForeignKey();
897 
905  void Set(SqlTable * RefTable,
906  SqlColumn * RefCol);
907 
911  const char * ForeignKeyName() const;
912 
918  void ForeignKeyName(const char * FkName);
919 
923  const char * ReferenceTableName() const;
924 
930  void ReferenceTableName(const char * RefTableName);
931 
932 
936  SqlTable * ReferenceTable() const;
937 
943  void ReferenceTable(SqlTable * RefTable);
944 
948  const char * ReferenceColumnName() const;
949 
955  void ReferenceColumnName(const char * RefColName);
956 
960  const char * LocalColumnName() const;
961 
967  void LocalColumnName(const char * ColName);
968 
972  SqlColumn * ReferenceColumn() const;
973 
979  void ReferenceColumn(SqlColumn * RefCol);
980 
984  SqlFkAction_e Action() const;
985 
991  void Action(SqlFkAction_e Act);
992 
996  SqlFkActionType_e ActionType() const;
997 
1003  void ActionType(SqlFkActionType_e AType);
1004 
1008  SqlFkMatchType_e MatchType() const;
1009 
1015  void MatchType(SqlFkMatchType_e AType);
1016 
1024  bool operator==(const SqlColumnForeignKey & Other);
1025 
1033  bool operator!=(const SqlColumnForeignKey & Other);
1034 
1038  static void CreateCpp();
1039 
1040  private:
1041 
1045  const char * _ForeignKeyName;
1046 
1050  const char * _ReferenceTableName;
1051 
1055  SqlTable * _ReferenceTable;
1056 
1061  const char * _ReferenceColumnName;
1062 
1066  const char * _LocalColumnName;
1067 
1071  SqlColumn * _ReferenceColumn;
1072 
1076  SqlFkAction_e _Action;
1077 
1081  SqlFkActionType_e _ActionType;
1082 
1086  SqlFkMatchType_e _MatchType;
1087  };
1088 
1094  : public DataTypeBase
1095  {
1096 
1097  public:
1098 
1105 
1111  SqlColumn(const SqlColumn & CopyFrom);
1112 
1116  virtual ~SqlColumn();
1117 
1123  void Name(const char * NewName);
1124 
1128  const char * Name() const;
1129 
1135  void Length(uint64_t Len);
1136 
1141  uint64_t Length() const;
1142 
1147  bool IsUnique() const;
1148 
1155  void IsUnique(bool SetUnique);
1156 
1161  bool IsPrimary() const;
1162 
1170  void IsPrimary(bool SetPrimary);
1171 
1176  bool HasSequence() const;
1177 
1187  void IsSequence(bool SetSeq,
1188  const char * SeqName);
1189 
1198  bool IsSequence(const char * & SeqName) const;
1199 
1203  bool MayBeNull() const;
1204 
1211  void MayBeNull(bool SetNullOk);
1212 
1216  bool IsNull() const;
1217 
1221  SqlColumnForeignKey * ForeignKey() const;
1222 
1228  void ForeignKey(SqlColumnForeignKey * Fk);
1229 
1233  bool HasForeignKey() const;
1234 
1238  bool HasDefault() const;
1239 
1248  bool Default(const char * & DefVal) const;
1249 
1258  bool Default(long double & DefVal) const;
1259 
1268  bool Default(bool & DefVal) const;
1269 
1276  void Attributes(SqlColumnAttributes * Attrs);
1277 
1285  bool operator==(const SqlColumn & Other);
1286 
1295  bool operator!=(const SqlColumn & Other);
1296 
1300  static void CreateCpp();
1301 
1302  protected:
1303 
1311  void CopyColumnData(const SqlColumn & Other);
1312 
1313  private:
1314 
1318  const char * _Name;
1319 
1323  uint64_t _Length;
1324 
1328  SqlColumnAttributes * _Attributes;
1329 
1335  std::vector<SqlColumnForeignKey*> _FkReferencedBy;
1336 
1337  friend class SqlTable;
1338  friend class SqlColumnForeignKey;
1339  };
1340 
1345  class SqlTable
1346  : public instance<SqlTable>
1347  {
1348 
1349  public:
1350 
1354  SqlTable();
1355 
1361  SqlTable(const SqlTable & CopyFrom);
1362 
1366  virtual ~SqlTable();
1367 
1373  void Name(const char * NewName);
1374 
1378  const char * Name() const;
1379 
1385  void Add(SqlColumn * NewCol);
1386 
1392  void Add(DataTypeBase * NewCol);
1393 
1397  const std::vector<SqlColumn*> * Cols() const;
1398 
1402  static void ResolveForeignKeys();
1403 
1411  SqlColumn * FindColumn(const char * ColName);
1412 
1420  static SqlTable * FindTable(const char * TblName);
1421 
1429  bool operator==(const SqlTable & Other);
1430 
1439  bool operator!=(const SqlTable & Other);
1440 
1444  static void CreateCpp();
1445 
1453  void AddUnique(SqlColumnUnique & Uniq);
1454 
1462  void AddUniqueColumn(SqlColumnUnique & Uniq,
1463  SqlColumn & Col);
1464 
1469  const std::vector<SqlColumnUnique*> *
1470  GetUniqueConstraints() const;
1471 
1472 
1480  void AddPrimaryKey(SqlColumnPrimaryKey & Uniq);
1481 
1489  void AddPrimaryKeyColumn(SqlColumnPrimaryKey & Uniq,
1490  SqlColumn & Col);
1491 
1496  const std::vector<SqlColumnPrimaryKey*> *
1497  GetPrimaryKeyConstraints() const;
1498 
1499  private:
1500 
1504  const char * _Name;
1505 
1509  std::vector<SqlColumn*> * _Columns;
1510 
1515  static std::map<const char *,SqlTable*> _AllTables;
1516 
1524  std::vector<SqlColumnForeignKey*> * _ForeignKeys;
1525 
1530  std::vector<SqlColumnUnique*> * _UniqueConstraints;
1531 
1536  std::vector<SqlColumnPrimaryKey*> * _PrimaryKeyConstraints;
1537  };
1538 
1543  : public instance<SqlVariable>
1544  {
1545 
1546  public:
1547 
1551  SqlVariable();
1552 
1558  SqlVariable(const SqlVariable & CopyFrom);
1559 
1563  SqlVariable(SqlSetScope_e Scope,
1564  const char * VarName,
1565  const char * VarValue);
1566 
1570  virtual ~SqlVariable();
1571 
1575  SqlSetScope_e Scope() const;
1576 
1582  void Scope(SqlSetScope_e TheScope);
1583 
1587  const char * Name() const;
1588 
1594  void Name(const char * VarName);
1595 
1599  const char * Value() const;
1600 
1606  void Value(const char * VarValue);
1607 
1613  static SqlVariable * Get(const char * Name);
1614 
1622  bool operator==(const SqlVariable & Other);
1623 
1631  bool operator!=(const SqlVariable & Other);
1632 
1633  private:
1634 
1638  SqlSetScope_e _Scope;
1639 
1643  const char * _Name;
1644 
1648  const char * _Value;
1649 
1653  static std::map<const char*,SqlVariable*> _All;
1654  };
1655 
1656  }
1657  }
1658 }
1659 
1660 #endif //_DOUGLAS_MARK_ROYER_SQL_TOOLS_TYPES_H_
AttributeDefault_e Type
The type for the default.
Definition: Types.hpp:766
virtual ~SqlColumnUnique()
SqlColumnUnique - Destructor.
An object that contains all of the informatiion about a multi-column UNIQUE constraint.
Definition: Types.hpp:636
const char * Name
Name of this PRIMARY KEY constraint.
Definition: Types.hpp:717
bool IsPrimaryKey
When TRUE, the column value is unique and the primary key.
Definition: Types.hpp:816
long long DefaultInt
When non-NULL, the default value is a string.
Definition: Types.hpp:782
long double DefaultDouble
When non-NULL, the default value is a string.
Definition: Types.hpp:787
SqlColumnForeignKey * ForeignKey
When non-NULL, this column has a foreign key.
Definition: Types.hpp:821
An object that contains all of the informatiion about a multi-column PUBLIC constraint.
Definition: Types.hpp:683
SqlColumnUnique()
SqlColumnUnique - Default Constructor.
const char * Name
Name of this UNIQUE constraint.
Definition: Types.hpp:670
A base object for DataType objects.
Definition: SQL.hpp:1800
SqlColumnPrimaryKey * PrimaryKeyConstraint
Pointer to SqlColumnPrimaryKey object when this column is part of a multi-column PRIVATE KEY constrai...
Definition: Types.hpp:863
SqlColumnUnique * UniqueConstraint
Pointer to SqlColumnUnique object when this column is part of a multi-column UNIQUE constraint...
Definition: Types.hpp:854
std::vector< SqlColumn * > * Columns
List of columns in this constraint.
Definition: Types.hpp:675
bool IsDefaultNow
When TRUE, the default is &#39;now()&#39;.
Definition: Types.hpp:802
const char * DefaultString
When non-NULL, the default value is a string.
Definition: Types.hpp:771
const char * DefaultSequenceName
When non-NULL, the column is auto increment and is the name of the sequence.
Definition: Types.hpp:777
Copyright Douglas Mark Royer DouglasRoyer@gmail.com.
Definition: Base.hpp:98
bool DefaultBool
When non-NULL, the default value is a string.
Definition: Types.hpp:792
SqlDataType_e
Generic names for data types.
Definition: SQL.hpp:197
bool NullAllowed
When TRUE, NULL values are allowed.
Definition: Types.hpp:797
std::vector< SqlColumn * > * Columns
List of columns in this constraint.
Definition: Types.hpp:722
bool IsUnique
When TRUE, the column value is unique on its own.
Definition: Types.hpp:810