Qore SqlUtil Module Reference  1.7
SqlUtil.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* SqlUtil.qm Copyright (C) 2013 - 2020 Qore Technologies, s.r.o.
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
25 // minimum required Qore version
26 
27 // requires the Util module
28 
29 // requires the DataProvider module
30 
31 // don't use "$" signs for variables and class members, assume local variable scope
32 
33 // require type definitions everywhere
34 
35 // enable all warnings
36 
37 
38 // version history is included below in the docs
39 
2125 namespace SqlUtil {
2128  public struct GenericColumnInfo {
2130  string qore_type;
2132  string native_type;
2134  softint size;
2136  softint scale;
2142  *string comment;
2144  bool notnull = False;
2146  hash<string, hash> driver;
2149  };
2150 
2152  public struct OperatorInfo {
2153  string op;
2154  auto arg;
2155  };
2156 
2158  public struct ColumnOperatorInfo {
2159  string cop;
2160  auto column;
2161  auto arg;
2162  };
2163 
2165  public struct InsertOperatorInfo {
2166  string _iop;
2167  any arg;
2168  };
2169 
2171  public struct UpdateOperatorInfo {
2172  string uop;
2173  auto arg;
2175  };
2176 
2178  public struct JoinOperatorInfo {
2179  string jop;
2180  auto table;
2181  *string alias;
2184  *string ta;
2185  *hash<auto> opt;
2186  };
2187 
2191  *string date_format;
2192 
2194  *TimeZone data_timezone;
2195 
2197  *TimeZone db_timezone;
2198 
2200  *string number_format;
2201 
2203  *softbool mandatory;
2204 
2206 
2208  *softint maxlen;
2209  };
2210 
2212 
2214  public struct SqlCommandInfo {
2216  string sql;
2217 
2219  list<auto> args;
2220  };
2221 
2226 
2229  const DB_FUNCTIONS = "functions";
2231  const DB_MVIEWS = "materialized views";
2233  const DB_PACKAGES = "packages";
2235  const DB_PROCEDURES = "procedures";
2237  const DB_SEQUENCES = "sequences";
2239  const DB_TABLES = "tables";
2241  const DB_TYPES = "named types";
2243  const DB_VIEWS = "views";
2245  const DB_SYNONYMS = "synonyms";
2247 
2248  /* @defgroup SqlTypeConstants SQL Type Constants
2249  These constants can be used for the \c "qore_type" values when creating columns to specify additional SQL column types
2250  */
2252  const VARCHAR = "string";
2254 
2256  const NUMERIC = "number";
2257 
2259  const CHAR = "char";
2260 
2262  const BLOB = "blob";
2263 
2265  const CLOB = "clob";
2267 
2272  const SZ_NONE = 0;
2274 
2276  const SZ_MAND = 1;
2277 
2279  const SZ_OPT = 2;
2280 
2282  const SZ_NUM = 3;
2284 
2289 
2292  const COP_AS = "as";
2293 
2295 
2297  const COP_CAST = "cast";
2298 
2300 
2302  const COP_PREPEND = "prepend";
2303 
2305 
2307  const COP_APPEND = "append";
2308 
2310 
2312  const COP_VALUE = "value";
2313 
2315 
2317  const COP_UPPER = "upper";
2318 
2320 
2322  const COP_LOWER = "lower";
2323 
2325 
2327  const COP_DISTINCT = "distinct";
2328 
2330 
2332  const COP_MIN = "min";
2333 
2335 
2337  const COP_MAX = "max";
2338 
2340 
2342  const COP_AVG = "avg";
2343 
2345 
2347  const COP_SUM = "sum";
2348 
2350 
2352  const COP_COUNT = "count";
2353 
2355 
2357  const COP_OVER = "over";
2358 
2360 
2362  const COP_MINUS = "minus";
2363 
2365 
2367  const COP_PLUS = "plus";
2368 
2370 
2372  const COP_DIVIDE = "divide";
2373 
2375 
2377  const COP_MULTIPLY = "multiply";
2378 
2380 
2382  const COP_YEAR = "year";
2383 
2385 
2387  const COP_YEAR_MONTH = "year_month";
2388 
2390 
2392  const COP_YEAR_DAY = "year_day";
2393 
2395 
2397  const COP_YEAR_HOUR = "year_hour";
2398 
2400 
2402  const COP_SEQ = "seq";
2403 
2405 
2407  const COP_SEQ_CURRVAL = "seq_currval";
2408 
2410 
2412  const COP_COALESCE = "coalesce";
2413 
2415 
2417  const COP_SUBSTR = "substr";
2418 
2420 
2424  const COP_LENGTH = "length";
2425 
2427 
2433  const COP_TRUNC_DATE = "truncate_date";
2434 
2436 
2440  const COP_CUME_DIST = "cume_dist";
2441 
2443 
2447  const COP_DENSE_RANK = "dense_rank";
2448 
2450 
2454  const COP_FIRST_VALUE = "first_value";
2455 
2457 
2461  const COP_LAST_VALUE = "last_value";
2462 
2464 
2468  const COP_NTILE = "ntile";
2469 
2471 
2475  const COP_PERCENT_RANK = "percent_rank";
2476 
2478 
2482  const COP_RANK = "rank";
2483 
2485 
2489  const COP_ROW_NUMBER = "row_number";
2490 
2492  const DefaultCopMap = ...;
2493 
2495 
2537 
2546  hash<ColumnOperatorInfo> make_cop(string cop, auto column, auto arg);
2547 
2548 
2550 
2562  hash<ColumnOperatorInfo> cop_as(auto column, string arg);
2563 
2564 
2566 
2580  hash<ColumnOperatorInfo> cop_cast(auto column, string arg, auto arg1, auto arg2);
2581 
2582 
2584 
2594  hash<ColumnOperatorInfo> cop_prepend(auto column, string arg);
2595 
2596 
2598 
2608  hash<ColumnOperatorInfo> cop_append(auto column, string arg);
2609 
2610 
2612 
2740  hash<ColumnOperatorInfo> cop_value(auto arg);
2741 
2742 
2744 
2753  hash<ColumnOperatorInfo> cop_upper(auto column);
2754 
2755 
2757 
2766  hash<ColumnOperatorInfo> cop_lower(auto column);
2767 
2768 
2770 
2779  hash<ColumnOperatorInfo> cop_distinct(auto column);
2780 
2781 
2783 
2792  hash<ColumnOperatorInfo> cop_min(auto column);
2793 
2794 
2796 
2805  hash<ColumnOperatorInfo> cop_max(auto column);
2806 
2807 
2809 
2818  hash<ColumnOperatorInfo> cop_avg(auto column);
2819 
2820 
2822 
2831  hash<ColumnOperatorInfo> cop_sum(auto column);
2832 
2833 
2835 
2842  hash<ColumnOperatorInfo> cop_count(auto column = '');
2843 
2844 
2846 
2853  hash<ColumnOperatorInfo> cop_over(auto column, *string partitionby, *string orderby);
2854 
2855 
2857 
2867  hash<ColumnOperatorInfo> cop_minus(auto column1, auto column2);
2868 
2869 
2871 
2881  hash<ColumnOperatorInfo> cop_plus(auto column1, auto column2);
2882 
2883 
2885 
2895  hash<ColumnOperatorInfo> cop_divide(auto column1, auto column2);
2896 
2897 
2899 
2909  hash<ColumnOperatorInfo> cop_multiply(auto column1, auto column2);
2910 
2911 
2913 
2922  hash<ColumnOperatorInfo> cop_year(auto column);
2923 
2924 
2926 
2935  hash<ColumnOperatorInfo> cop_year_month(auto column);
2936 
2937 
2939 
2948  hash<ColumnOperatorInfo> cop_year_day(auto column);
2949 
2950 
2952 
2961  hash<ColumnOperatorInfo> cop_year_hour(auto column);
2962 
2963 
2965 
2975  hash<ColumnOperatorInfo> cop_seq(string seq, *string as);
2976 
2977 
2979 
2989  hash<ColumnOperatorInfo> cop_seq_currval(string seq, *string as);
2990 
2991 
2993 
3005  hash<ColumnOperatorInfo> cop_coalesce(auto col1, auto col2);
3006 
3007 
3009 
3020  hash<ColumnOperatorInfo> cop_substr(auto column, int start, *int count);
3021 
3022 
3024 
3035  hash<ColumnOperatorInfo> cop_length(auto column);
3036 
3037 
3039 
3053  hash<ColumnOperatorInfo> cop_trunc_date(auto column, string mask);
3054 
3055 
3056 
3058 
3086  hash<ColumnOperatorInfo> cop_cume_dist();
3087 
3088 
3090 
3118  hash<ColumnOperatorInfo> cop_dense_rank();
3119 
3120 
3122 
3150  hash<ColumnOperatorInfo> cop_first_value(any column);
3151 
3152 
3154 
3182  hash<ColumnOperatorInfo> cop_last_value(any column);
3183 
3184 
3186 
3216  hash<ColumnOperatorInfo> cop_ntile(int value);
3217 
3218 
3220 
3248  hash<ColumnOperatorInfo> cop_percent_rank();
3249 
3250 
3252 
3280  hash<ColumnOperatorInfo> cop_rank();
3281 
3282 
3284 
3312  hash<ColumnOperatorInfo> cop_row_number();
3313 
3314 
3316 
3367  const DT_YEAR = "Y";
3369 
3371  const DT_MONTH = "M";
3372 
3374  const DT_DAY = "D";
3375 
3377  const DT_HOUR = "H";
3378 
3380  const DT_MINUTE = "m";
3381 
3383  const DT_SECOND = "S";
3384 
3385  // let's simulate and enum here'
3386  const DT_ALL_VALUES = ( DT_YEAR, DT_MONTH, DT_DAY, DT_HOUR, DT_MINUTE, DT_SECOND );
3388 
3393  const DefaultUopMap = ...;
3395 
3397 
3419 
3428  hash<UpdateOperatorInfo> make_uop(string uop, auto arg, *hash<UpdateOperatorInfo> nest);
3429 
3430 
3432 
3442  hash<UpdateOperatorInfo> uop_prepend(string arg, *hash<UpdateOperatorInfo> nest);
3443 
3444 
3446 
3456  hash<UpdateOperatorInfo> uop_append(string arg, *hash<UpdateOperatorInfo> nest);
3457 
3458 
3460 
3469  hash<UpdateOperatorInfo> uop_upper(*hash<UpdateOperatorInfo> nest);
3470 
3471 
3473 
3482  hash<UpdateOperatorInfo> uop_lower(*hash<UpdateOperatorInfo> nest);
3483 
3484 
3486 
3497  hash<UpdateOperatorInfo> uop_substr(int start, *int count, *hash<UpdateOperatorInfo> nest);
3498 
3499 
3501 
3511  hash<UpdateOperatorInfo> uop_plus(auto arg, *hash<UpdateOperatorInfo> nest);
3512 
3513 
3515 
3525  hash<UpdateOperatorInfo> uop_minus(auto arg, *hash<UpdateOperatorInfo> nest);
3526 
3527 
3529 
3539  hash<UpdateOperatorInfo> uop_multiply(auto arg, *hash<UpdateOperatorInfo> nest);
3540 
3541 
3543 
3553  hash<UpdateOperatorInfo> uop_divide(auto arg, *hash<UpdateOperatorInfo> nest);
3554 
3555 
3557 
3566  hash<UpdateOperatorInfo> uop_seq(string seq);
3567 
3568 
3570 
3579  hash<UpdateOperatorInfo> uop_seq_currval(string seq);
3580 
3582 
3589 
3592  const JOP_INNER = "inner";
3593 
3595 
3597  const JOP_LEFT = "left";
3598 
3600 
3602  const JOP_RIGHT = "right";
3603 
3605  const JopMap = ...;
3606 
3608 
3618 
3622  hash<string, hash<JoinOperatorInfo>> make_jop(string jop, AbstractTable table, *string alias, *hash jcols, *hash cond, *string ta, *hash<auto> opt);
3623 
3624 
3626 
3630  hash<string, hash<JoinOperatorInfo>> make_jop(string jop, string table_name, *string alias, *hash jcols, *hash cond, *string ta, *hash<auto> opt);
3631 
3632 
3634 
3653  hash<string, hash<JoinOperatorInfo>> join_inner(AbstractTable table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3654 
3655 
3657 
3676  hash<string, hash<JoinOperatorInfo>> join_inner(Table table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3677 
3678 
3680 
3699  hash<string, hash<JoinOperatorInfo>> join_inner(string table_name, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3700 
3701 
3703 
3725  hash<string, hash<JoinOperatorInfo>> join_inner(string ta, AbstractTable table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3726 
3727 
3729 
3749  hash<string, hash<JoinOperatorInfo>> join_inner(string ta, Table table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3750 
3751 
3753 
3775  hash<string, hash<JoinOperatorInfo>> join_inner_alias(string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3776 
3777 
3779 
3798  hash<string, hash<JoinOperatorInfo>> join_left(AbstractTable table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3799 
3800 
3802 
3821  hash<string, hash<JoinOperatorInfo>> join_left(Table table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3822 
3823 
3825 
3846  hash<string, hash<JoinOperatorInfo>> join_left(string table_name, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3847 
3848 
3850 
3870  hash<string, hash<JoinOperatorInfo>> join_left(string ta, AbstractTable table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3871 
3872 
3874 
3894  hash<string, hash<JoinOperatorInfo>> join_left(string ta, Table table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3895 
3896 
3898 
3920  hash<string, hash<JoinOperatorInfo>> join_left_alias(string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3921 
3922 
3924 
3943  hash<string, hash<JoinOperatorInfo>> join_right(AbstractTable table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3944 
3945 
3947 
3966  hash<string, hash<JoinOperatorInfo>> join_right(Table table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3967 
3968 
3970 
3991  hash<string, hash<JoinOperatorInfo>> join_right(string table_name, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
3992 
3993 
3995 
4015  hash<string, hash<JoinOperatorInfo>> join_right(string ta, AbstractTable table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
4016 
4017 
4019 
4039  hash<string, hash<JoinOperatorInfo>> join_right(string ta, Table table, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
4040 
4041 
4043 
4065  hash<string, hash<JoinOperatorInfo>> join_right_alias(string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash<auto> opt);
4066 
4068 
4073 
4076  const OP_LIKE = "like";
4077 
4079 
4081  const OP_LT = "<";
4082 
4084 
4086  const OP_LE = "<=";
4087 
4089 
4091  const OP_GT = ">";
4092 
4094 
4096  const OP_GE = ">=";
4097 
4099 
4101  const OP_NE = "!=";
4102 
4104 
4106  const OP_EQ = "=";
4107 
4109 
4111  const OP_CLT = "C<";
4112 
4114 
4116  const OP_CLE = "C<=";
4117 
4119 
4121  const OP_CGT = "C>";
4122 
4124 
4126  const OP_CGE = "C>=";
4127 
4129 
4131  const OP_CNE = "C!=";
4132 
4134 
4136  const OP_CEQ = "C=";
4137 
4139 
4141  const OP_BETWEEN = "between";
4142 
4144 
4146  const OP_IN = "in";
4147 
4149 
4151  const OP_NOT = "not";
4152 
4154 
4156  const OP_SUBSTR = "substr";
4157 
4159 
4161  const OP_OR = "or";
4162 
4164 
4166  const OP_IN_SELECT = "in_select";
4167 
4169  const DefaultOpMap = ...;
4170 
4172 
4196  hash<OperatorInfo> make_op(string op, auto arg);
4198 
4199 
4201 
4210  hash<OperatorInfo> op_like(string str);
4211 
4212 
4214 
4225  hash<OperatorInfo> op_lt(auto arg);
4226 
4227 
4229 
4240  hash<OperatorInfo> op_le(auto arg);
4241 
4242 
4244 
4255  hash<OperatorInfo> op_gt(auto arg);
4256 
4257 
4259 
4270  hash<OperatorInfo> op_ge(auto arg);
4271 
4272 
4274 
4287  hash<OperatorInfo> op_ne(auto arg);
4288 
4289 
4291 
4304  hash<OperatorInfo> op_eq(auto arg);
4305 
4306 
4308 
4320  hash<OperatorInfo> op_between(auto l, auto r);
4321 
4322 
4324 
4333  hash<OperatorInfo> op_in();
4334 
4335 
4337 
4344  hash<OperatorInfo> op_in_select(string table, hash<auto> select_hash);
4345 
4346 
4348 
4355  hash<OperatorInfo> op_in_select(AbstractTable table, hash<auto> select_hash);
4356 
4357 
4359 
4366  hash<OperatorInfo> op_in_select(Table table, hash<auto> select_hash);
4367 
4368 
4370 
4381  hash<OperatorInfo> op_in(list<auto> args);
4382 
4383 
4385 
4392  hash<OperatorInfo> op_not(hash arg);
4393 
4394 
4396 
4407  hash<OperatorInfo> op_clt(string arg);
4408 
4409 
4411 
4422  hash<OperatorInfo> op_cle(string arg);
4423 
4424 
4426 
4437  hash<OperatorInfo> op_cgt(string arg);
4438 
4439 
4441 
4452  hash<OperatorInfo> op_cge(string arg);
4453 
4454 
4456 
4467  hash<OperatorInfo> op_cne(string arg);
4468 
4469 
4471 
4482  hash<OperatorInfo> op_ceq(string arg);
4483 
4484 
4486 
4497  hash<OperatorInfo> op_substr(int start, *int count, string text);
4498 
4499 
4501 
4511  hash<OperatorInfo> op_substr(int start, string text);
4512 
4513 
4515 
4532  hash<string, hash<OperatorInfo>> wop_or(hash h1, hash h2);
4533 
4535 
4542 
4545  const IOP_SEQ = "seq";
4546 
4548 
4550  const IOP_SEQ_CURRVAL = "seq_currval";
4551 
4553  const DefaultIopMap = {};
4555 
4561 
4569  hash<InsertOperatorInfo> make_iop(string iop, auto arg);
4570 
4571 
4573 
4582  hash<InsertOperatorInfo> iop_seq(string arg);
4583 
4584 
4586 
4595  hash<InsertOperatorInfo> iop_seq_currval(string arg);
4596 
4598 
4600  const SqlUtilDrivers = ...;
4601 
4602 
4603  // private variable to store the closure used to deserialize datasources (if any)
4604  extern code ds_get;
4605 
4606  // private variable to store the closure used to serialize datasources (if any)
4607  extern code ds_do;
4608 
4611 
4612 
4615 
4616 
4617  // private function used to deserialize datasources
4618  AbstractDatasource sqlutil_get_ds(string type, string config);
4619 
4620 
4621  // private function used to serialize datasources
4622  hash<auto> sqlutil_ds(AbstractDatasource ds);
4623 
4624 
4626 class AbstractHashContainer : public Serializable {
4627 
4628 public:
4629 
4630 
4631 protected:
4634 
4635 public:
4636 
4639 
4640 
4643 
4644 
4647 
4648 
4650 
4665  auto memberGate(string k);
4666 
4667 
4669 
4676 
4677 
4679  abstract auto take(string k);
4680 
4682  renameKey(string old_name, string new_name);
4683 
4684 
4686  *hash<auto> getHash();
4687 
4688 
4690 
4699  bool matchKeys(hash h1);
4700 
4701 
4703 
4712  bool matchKeys(list<auto> l);
4713 
4714 
4716 
4726 
4727 
4729 
4739 
4740 
4742 
4751  bool partialMatchKeys(list<auto> l);
4752 
4753 
4755 
4765 
4766 
4768 
4777  bool val();
4778 
4779 
4781 
4788  list<string> keys();
4789 
4790 
4792 
4799  list<auto> values();
4800 
4801 
4803 
4811 
4812 
4814 
4822 
4823 
4825 
4833 
4834 
4836  bool empty();
4837 
4838 
4840 
4847  int size();
4848 
4849 
4851 
4860  bool hasKey(string k);
4861 
4862 
4864 
4873  bool hasKeyValue(string k);
4874 
4875 
4877 
4886  *string firstKey();
4887 
4888 
4890 
4899  *string lastKey();
4900 
4901 
4903  abstract string getElementName();
4904  };
4905 
4907 class AbstractListContainer : public Serializable {
4908 
4909 public:
4910 
4911 
4912 protected:
4913  softlist l;
4914 
4915 public:
4916 
4918  constructor(softlist nl);
4919 
4920 
4922 
4933  abstract auto get(softint i);
4934 
4936  add(auto val);
4937 
4938 
4940  auto take(int i);
4941 
4942 
4944  list<auto> getList();
4945 
4946 
4948 
4957  bool val();
4958 
4959 
4961 
4969 
4970 
4972  bool empty();
4973 
4974 
4976 
4983  int size();
4984 
4985 
4987  abstract string getElementName();
4988 
4989 protected:
4990  checkIndex(int i);
4991 public:
4992 
4993  };
4994 
4997 
4998 public:
5001 
5002 
5004  constructor(AbstractDatasource ds, hash tables, *hash<auto> opt);
5005 
5006 
5008  constructor(AbstractDatasource ds);
5009 
5010 
5012  add(string k, Table val);
5013 
5014 
5016  add(string k, AbstractTable val);
5017 
5018 
5021 
5022 
5025 
5026 
5028  AbstractTable take(string k);
5029 
5030 
5032  populate(AbstractDatasource ds, hash<auto> tables, *hash<auto> opt);
5033 
5034 
5036  populate(AbstractDatasource ds);
5037 
5038 
5040 
5054  *list<auto> getDropAllForeignConstraintsOnTableSql(string name, *hash<auto> opt);
5055 
5056 
5058 
5074 
5075 
5077  string getElementName();
5078 
5079 
5081  *AbstractTable getIfExists(AbstractDatasource ds, string name);
5082 
5083 
5085  AbstractTable get(AbstractDatasource ds, string name);
5086 
5087 
5089 
5104  *string getRenameTableIfExistsSql(string old_name, string new_name, *hash<auto> opts);
5105 
5106 
5108 
5119  bool tableRenamed(string old_name, string new_name, string old_sql_name);
5120 
5121 
5122 protected:
5123  tableRenamedIntern(string old_name, string new_name, string oldsn);
5124 public:
5125 
5126 
5128 
5143  *string getDropConstraintIfExistsSql(string tname, string cname, *hash<auto> opts);
5144 
5145 
5146  list<auto> getCreateList();
5147 
5148 
5149  Qore::AbstractIterator createIterator();
5150 
5151 
5153 
5161  list<auto> getDropList();
5162 
5163 
5165 
5173 
5174 
5175 protected:
5176  getDependencies(reference<hash> tdh, reference<hash> sdh, *reference<hash> th);
5177 public:
5178 
5179  };
5180 
5183 
5184 public:
5187 
5188 
5191 
5192 
5194  add(string k, AbstractColumn val);
5195 
5196 
5199 
5200 
5202 
5218 
5219 
5221  Columns subset(softlist l);
5222 
5223 
5225  string getElementName();
5226 
5227 
5229  bool equal(Columns cols);
5230 
5231 
5233  AbstractIterator getSqlColumnNameIterator();
5234 
5235  };
5236 
5238 class AbstractDdlObject : public Serializable {
5239 
5240 public:
5242  string name;
5243 
5245  string ddl_name;
5246 
5248 protected:
5250 public:
5251 
5252 
5255 
5256 
5258 
5260  abstract string getDdlName(string name);
5261  };
5262 
5265 
5266 public:
5268  string native_type;
5269 
5271  *string qore_type;
5272 
5274  int size;
5275 
5277  bool nullable;
5278 
5280  *string def_val;
5281 
5283  *string comment;
5284 
5286 protected:
5288 public:
5289 
5290 
5291  constructor(string n, string nt, *string qt, int sz, bool nul, *string dv, *string c)
5292  ;
5293 
5294 
5297 
5298 
5301 
5302 
5304 
5313  abstract list<auto> getAddColumnSql(AbstractTable t);
5314 
5316  string getDropSql(string table_name);
5317 
5318 
5320 
5333  list<auto> getModifySql(AbstractTable t, AbstractColumn c, *hash<auto> opt);
5334 
5335 
5337 
5347  abstract string getRenameSql(AbstractTable t, string new_name);
5348 
5351 
5352 
5354 protected:
5355  abstract bool equalImpl(AbstractColumn c);
5356 public:
5357 
5359 
5372 protected:
5373  abstract list<auto> getModifySqlImpl(AbstractTable t, AbstractColumn c, *hash<auto> opt);
5374 public:
5375  };
5376 
5378 class NumericColumnInfo : public Serializable {
5379 
5380 public:
5382  int scale;
5383 
5384  constructor(softint n_scale = 0);
5385 
5386 
5388  string getNativeTypeString(string native_type, int precision);
5389 
5390  };
5391 
5394 
5395 public:
5396  constructor(*hash c) ;
5397 
5398 
5400  add(string k, AbstractIndex val);
5401 
5402 
5405 
5406 
5408  AbstractIndex take(string k);
5409 
5410 
5413 
5414 
5416 
5432 
5433 
5434  string getElementName();
5435 
5436  };
5437 
5439 class AbstractIndex : public Serializable {
5440 
5441 public:
5443  string name;
5444 
5446  bool unique;
5447 
5450 
5451 protected:
5454 
5455 public:
5456 
5458  constructor(string n, bool u, hash c);
5459 
5460 
5462  string getName();
5463 
5464 
5466  bool hasColumn(string cname);
5467 
5468 
5470  abstract string getCreateSql(string table_name, *hash<auto> opt);
5471 
5473  string getDropSql(string table_name);
5474 
5475 
5478 
5479 
5482 
5483 
5485  abstract bool equalImpl(AbstractIndex ix);
5486 
5488  abstract string getRenameSql(string table_name, string new_name);
5489 
5492 
5493 
5496 
5497 
5500 
5501 
5503  list<auto> getRecreateSql(AbstractDatasource ds, string table_name, *hash<auto> opt);
5504 
5505  };
5506 
5509 
5510 public:
5511  constructor(*hash c) ;
5512 
5513 
5516 
5517 
5520 
5521 
5524 
5525 
5527 
5543 
5544 
5545  string getElementName();
5546 
5547  };
5548 
5550 class AbstractConstraint : public Serializable {
5551 
5552 public:
5553 
5554 
5555 protected:
5557  string name;
5558 
5559 public:
5560 
5562  constructor(string n);
5563 
5564 
5566  string getName();
5567 
5568 
5570  rename(string n);
5571 
5572 
5574  abstract string getCreateSql(string table_name, *hash<auto> opt);
5575 
5577  string getDropSql(string table_name);
5578 
5579 
5581  abstract list<auto> getRenameSql(string table_name, string new_name);
5582 
5584  string getDisableSql(string table_name);
5585 
5586 
5588  string getEnableSql(string table_name, *hash<auto> opt);
5589 
5590 
5593 
5594 
5596 protected:
5597  abstract bool equalImpl(AbstractConstraint c);
5598 public:
5599 
5601  abstract bool setIndexBase(string ix);
5602 
5604  abstract clearIndex();
5605 
5607  bool hasColumn(string cname);
5608 
5609  };
5610 
5613 
5614 public:
5616  string src;
5617 
5619  constructor(string n, string n_src) ;
5620 
5621 
5623 protected:
5625 public:
5626 
5627 
5629  bool setIndexBase(string ix);
5630 
5631 
5634 
5635  };
5636 
5639 
5640 public:
5641 protected:
5644 
5646  *string index;
5647 
5648 public:
5649 
5651  constructor(string n, *hash c, *string n_index) ;
5652 
5653 
5655  constructor(string n, Columns c, *string n_index) ;
5656 
5657 
5659 
5664 
5665 
5667  hash<auto> getDisableReenableSql(AbstractDatasource ds, string table_name, *hash<auto> opts);
5668 
5669 
5672 
5673 
5675 
5686 
5687 
5689  removeSourceConstraint(string tname, list cols);
5690 
5691 
5693  renameSourceConstraintTable(string old_name, string new_name);
5694 
5695 
5697  bool hasColumn(string cname);
5698 
5699 
5701  *string getIndex();
5702 
5703 
5705 protected:
5707 public:
5708 
5709 
5711  bool setIndexBase(string ix);
5712 
5713 
5716 
5717 
5719  abstract string getCreateSql(string table_name, *hash<auto> opts);
5720  };
5721 
5724 
5725 public:
5727  constructor(string n, *hash c, *string n_index) ;
5728 
5729  };
5730 
5733 
5734 public:
5735  constructor() ;
5736 
5737 
5738  constructor(string n, *hash c) ;
5739 
5740  };
5741 
5744 
5745 public:
5746  constructor(*hash c) ;
5747 
5748 
5751 
5752 
5755 
5756 
5759 
5760 
5762 
5778 
5779 
5781  *hash findConstraintOn(string table, softlist cols);
5782 
5783 
5785  string getElementName();
5786 
5787  };
5788 
5790 class ForeignConstraintTarget : public Serializable {
5791 
5792 public:
5794  string table;
5795 
5798 
5800  constructor(string t, Columns c);
5801 
5802 
5805 
5806  };
5807 
5810 
5811 public:
5814 
5815  constructor(string n, Columns c, ForeignConstraintTarget t) ;
5816 
5817 
5819 protected:
5821 public:
5822 
5823  };
5824 
5826 class AbstractSequence : public Serializable {
5827 
5828 public:
5830  string name;
5831 
5834 
5837 
5840 
5842  constructor(string n_name, number n_start = 1, number n_increment = 1, *softnumber n_max);
5843 
5844 
5846  abstract string getCreateSql(*hash<auto> opt);
5847 
5849 
5851  string getDropSql(*hash<auto> opt);
5852 
5853 
5855 
5858  abstract softlist<auto> getRenameSql(string new_name, *hash<auto> opt);
5859  };
5860 
5862 class AbstractView : public Serializable {
5863 
5864 public:
5865  // ! potential object schema
5866  *string schema;
5867 
5869  string name;
5870 
5872  string src;
5873 
5876 
5878  constructor(string n_name, string n_src);
5879 
5880 
5882  abstract string getCreateSql(*hash<auto> opt);
5883 
5885 
5887  string getDropSql(*hash<auto> opt);
5888 
5889 
5891 
5894  abstract softlist<auto> getRenameSql(string new_name, *hash<auto> opt);
5895  };
5896 
5898 class AbstractFunctionBase : public Serializable {
5899 
5900 public:
5902  string name;
5903 
5905  string type;
5906 
5908  string src;
5909 
5911 
5915  constructor(string n, string n_type, string n_src);
5916 
5917 
5919  string getType();
5920 
5921 
5923 
5925  string getDropSql(*hash<auto> opt);
5926 
5927 
5930 
5931 
5933  string getNormalizedSource(string src);
5934 
5935 
5937 protected:
5939 public:
5940  };
5941 
5944 
5945 public:
5947 
5951  constructor(string n, string n_type, string n_src) ;
5952 
5953 
5955  abstract list<auto> getCreateSql(*hash<auto> opt);
5956 
5958 
5961  abstract softlist<auto> getRenameSql(string new_name, *hash<auto> opt);
5962 
5964  setName(string new_name);
5965 
5966  };
5967 
5970 
5971 public:
5972  constructor(*hash c) ;
5973 
5974 
5977 
5978 
5981 
5982 
5984 
6000 
6001 
6002  string getElementName();
6003 
6004  };
6005 
6008 
6009 public:
6011  constructor(string n, string n_src) ;
6012 
6013 
6015  abstract list<auto> getCreateSql(string table_name, *hash<auto> opt);
6016 
6018  abstract softlist<auto> getRenameSql(string table_name, string new_name);
6019 
6021  abstract list<auto> getDropSql(string table_name);
6022  };
6023 
6026 
6027 public:
6028  constructor(*hash c) ;
6029 
6030 
6033 
6034 
6037 
6038 
6040 
6056 
6057 
6058  string getElementName();
6059 
6060  };
6061 };
SqlUtil::Functions::getElementName
string getElementName()
must return the name of the contained element
SqlUtil::COP_COUNT
const COP_COUNT
to return the row count
Definition: SqlUtil.qm.dox.h:2352
SqlUtil::op_cge
hash< OperatorInfo > op_cge(string arg)
returns an OperatorInfo hash for the ">=" operator with the given argument for use in where clauses w...
SqlUtil::AbstractFunction::constructor
constructor(string n, string n_type, string n_src)
creates the object from the arguments passed
SqlUtil::SqlUtilDrivers
const SqlUtilDrivers
known drivers
Definition: SqlUtil.qm.dox.h:4600
SqlUtil::Tables::constructor
constructor(AbstractDatasource ds)
creates and populates the object from tables in the database
SqlUtil::OP_CEQ
const OP_CEQ
the SQL equals operator (=) for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4136
SqlUtil::ColumnOperatorInfo::arg
auto arg
optional argument
Definition: SqlUtil.qm.dox.h:2161
SqlUtil::COP_MINUS
const COP_MINUS
the SQL "minus" operator
Definition: SqlUtil.qm.dox.h:2362
SqlUtil::cop_divide
hash< ColumnOperatorInfo > cop_divide(auto column1, auto column2)
returns a ColumnOperatorInfo hash for the "/" operator with the given arguments
SqlUtil::make_jop
hash< string, hash< JoinOperatorInfo > > make_jop(string jop, AbstractTable table, *string alias, *hash jcols, *hash cond, *string ta, *hash< auto > opt)
returns hash keyed with the table name assigned to a JoinOperatorInfo hash
SqlUtil::op_in_select
hash< OperatorInfo > op_in_select(string table, hash< auto > select_hash)
returns an OperatorInfo hash for the "in" operator with a subquery as the argument; for use in where ...
SqlUtil::AbstractFunctionBase::getType
string getType()
returns the type of object
SqlUtil::SZ_NUM
const SZ_NUM
the data type is numeric so takes an optional precision and scale
Definition: SqlUtil.qm.dox.h:2282
SqlUtil::Functions::memberGate
AbstractFunction memberGate(string k)
returns the AbstractFunction object corresponding to the key given or throws a KEY-ERROR exception
SqlUtil::AbstractSequence::getDropSql
string getDropSql(*hash< auto > opt)
returns a string that can be used to drop the sequence from the database
SqlUtil::IOP_SEQ
const IOP_SEQ
for using the value of a sequence
Definition: SqlUtil.qm.dox.h:4545
SqlUtil::AbstractFunction::getRenameSql
abstract softlist< auto > getRenameSql(string new_name, *hash< auto > opt)
returns a list of strings that can be used to rename the function in the database
SqlUtil::GenericColumnInfo::scale
softint scale
for numeric data types, this value gives the scale
Definition: SqlUtil.qm.dox.h:2136
SqlUtil::COP_YEAR
const COP_YEAR
to return a date value with year information only
Definition: SqlUtil.qm.dox.h:2382
SqlUtil::NUMERIC
const NUMERIC
specifies a numeric column (equivalent to Qore::Type::Number)
Definition: SqlUtil.qm.dox.h:2256
SqlUtil::AbstractHashContainer::keys
list< string > keys()
Returns a list of key names of the contained hash.
SqlUtil::CHAR
const CHAR
specifies a CHAR column
Definition: SqlUtil.qm.dox.h:2259
SqlUtil::AbstractHashContainer::partialMatchKeys
bool partialMatchKeys(AbstractHashContainer c)
returns True if the container argument has at least the same keys (in any order, can have more keys),...
SqlUtil::COP_DENSE_RANK
const COP_DENSE_RANK
Analytic (window) function: DENSE_RANK.
Definition: SqlUtil.qm.dox.h:2447
SqlUtil::AbstractHashContainer::firstKey
*string firstKey()
Returns the first key name in the contained hash or NOTHING if the contained hash has no keys.
SqlUtil::AbstractHashContainer::iterator
Qore::AbstractIterator iterator()
Returns a HashIterator object for the contained hash.
SqlUtil::AbstractSequence::constructor
constructor(string n_name, number n_start=1, number n_increment=1, *softnumber n_max)
creates the object from the arguments
SqlUtil::AbstractHashContainer::getElementName
abstract string getElementName()
must return the name of the contained element
SqlUtil::Columns::take
AbstractColumn take(string k)
removes the given key from the contained hash and returns the value
SqlUtil::Tables::getDropList
list< auto > getDropList()
returns a list of cached table names in the order that can be used to drop the tables,...
SqlUtil::COP_UPPER
const COP_UPPER
to return column value in upper case
Definition: SqlUtil.qm.dox.h:2317
SqlUtil::Tables::populate
populate(AbstractDatasource ds)
populates the object from tables in the database
SqlUtil::AbstractFunctionBase::constructor
constructor(string n, string n_type, string n_src)
creates the object from the arguments passed
SqlUtil::AbstractFunction::getCreateSql
abstract list< auto > getCreateSql(*hash< auto > opt)
returns a list of SQL strings that can be used to create the function in the database
SqlUtil::op_in
hash< OperatorInfo > op_in()
returns an OperatorInfo hash for the "in" operator with all arguments passed to the function; for use...
SqlUtil::OP_CNE
const OP_CNE
the SQL not equals operator (!= or <>) for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4131
SqlUtil::DB_SEQUENCES
const DB_SEQUENCES
Feature: sequences.
Definition: SqlUtil.qm.dox.h:2237
SqlUtil::AbstractSequence
base class for sequences
Definition: SqlUtil.qm.dox.h:5826
SqlUtil::op_like
hash< OperatorInfo > op_like(string str)
returns an OperatorInfo hash for the "like" operator with the given argument for use in where clauses
SqlUtil::Tables::constructor
constructor(AbstractDatasource ds, hash tables, *hash< auto > opt)
creates and populates the object from a hash<auto> description
SqlUtil::AbstractIndex::getName
string getName()
returns the index name
SqlUtil::COP_YEAR_MONTH
const COP_YEAR_MONTH
to return a date value with year to month information
Definition: SqlUtil.qm.dox.h:2387
SqlUtil::AbstractCheckConstraint::clearIndex
clearIndex()
clears any index base for the constraint
SqlUtil::cop_row_number
hash< ColumnOperatorInfo > cop_row_number()
Analytic/window function: number of the current row within its partition, counting from 1.
SqlUtil::iop_seq
hash< InsertOperatorInfo > iop_seq(string arg)
returns an InsertOperatorInfo hash for retrieving the value of the given sequence in insert queries
SqlUtil::Columns::subset
Columns subset(softlist l)
returns a subset of the current columns according to the list<auto> argument
SqlUtil::DT_MONTH
const DT_MONTH
Format unit: month.
Definition: SqlUtil.qm.dox.h:3371
SqlUtil::AbstractColumnSupportingConstraint::addSourceConstraint
addSourceConstraint(string tname, AbstractForeignConstraint fk)
adds a foreign constraint source to the unique constraint
SqlUtil::cop_length
hash< ColumnOperatorInfo > cop_length(auto column)
returns a ColumnOperatorInfo hash for the "len" operator with the given argument; returns the length ...
SqlUtil::OperatorInfo::arg
auto arg
optional argument
Definition: SqlUtil.qm.dox.h:2154
SqlUtil::AbstractConstraint::getName
string getName()
returns the constraint name
SqlUtil::AbstractTrigger
the base class for triggers
Definition: SqlUtil.qm.dox.h:6007
SqlUtil::Triggers::getElementName
string getElementName()
must return the name of the contained element
SqlUtil::SZ_OPT
const SZ_OPT
the data type takes an optional size parameter
Definition: SqlUtil.qm.dox.h:2279
SqlUtil::AbstractUniqueConstraint
represents a unique column constraint
Definition: SqlUtil.qm.dox.h:5723
SqlUtil::ForeignConstraints
foreign constraint container class that throws an exception if an unknown constraint is accessed
Definition: SqlUtil.qm.dox.h:5743
SqlUtil::COP_ROW_NUMBER
const COP_ROW_NUMBER
Analytic (window) function: ROW_NUMBER.
Definition: SqlUtil.qm.dox.h:2489
SqlUtil::InsertOperatorInfo::arg
any arg
optional argument
Definition: SqlUtil.qm.dox.h:2167
SqlUtil::uop_divide
hash< UpdateOperatorInfo > uop_divide(auto arg, *hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "/" operator with the given arguments
SqlUtil::AbstractHashContainer::keyIterator
Qore::AbstractIterator keyIterator()
Returns a HashKeyIterator object for the contained hash.
SqlUtil::DT_HOUR
const DT_HOUR
Format unit: hour.
Definition: SqlUtil.qm.dox.h:3377
SqlUtil::AbstractIndex::equal
bool equal(AbstractIndex ix)
returns True if the argument is equal to the current index, False if not
SqlUtil::AbstractHashContainer::partialMatchKeys
bool partialMatchKeys(hash h1)
returns True if the hash argument has at least the same keys (in any order, can have more keys),...
SqlUtil::AbstractConstraint::name
string name
the name of the constraint
Definition: SqlUtil.qm.dox.h:5557
type
string type(auto arg)
SqlUtil::DefaultCopMap
const DefaultCopMap
a hash of default column operator descriptions
Definition: SqlUtil.qm.dox.h:2492
SqlUtil::op_cle
hash< OperatorInfo > op_cle(string arg)
returns an OperatorInfo hash for the "<=" operator with the given argument for use in where clauses w...
SqlUtil::join_right
hash< string, hash< JoinOperatorInfo > > join_right(AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt)
returns a hash for right outer joins with the given arguments
SqlUtil::iop_seq_currval
hash< InsertOperatorInfo > iop_seq_currval(string arg)
returns an InsertOperatorInfo hash for retrieving the current value of the given sequence in insert q...
SqlUtil::OP_NE
const OP_NE
the SQL not equals operator (!= or <>) for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4101
SqlUtil::AbstractConstraint::getEnableSql
string getEnableSql(string table_name, *hash< auto > opt)
returns a string that can be used to enable the constraint in the database; if disabling constraints ...
SqlUtil::cop_rank
hash< ColumnOperatorInfo > cop_rank()
Analytic/window function: rank of the current row with gaps.
SqlUtil::Triggers::add
add(string k, AbstractTrigger val)
adds the given value to the hash with the given key name
SqlUtil::AbstractHashContainer::memberGate
auto memberGate(string k)
returns the value of the given key in the contained hash if it exists, otherwise throws a KEY-ERROR e...
SqlUtil::GenericColumnInfo::comment
*string comment
an optional comment for the column
Definition: SqlUtil.qm.dox.h:2142
SqlUtil::ForeignConstraintTarget
a class describing a foreign constraint target
Definition: SqlUtil.qm.dox.h:5790
SqlUtil::AbstractIndex::columns
Columns columns
an object of class Columns representing the columns in the index
Definition: SqlUtil.qm.dox.h:5449
SqlUtil::COP_LENGTH
const COP_LENGTH
to get the length of a text field
Definition: SqlUtil.qm.dox.h:2424
SqlUtil::AbstractSequence::max
*number max
the ending number
Definition: SqlUtil.qm.dox.h:5839
SqlUtil::COP_OVER
const COP_OVER
the SQL "over" clause
Definition: SqlUtil.qm.dox.h:2357
SqlUtil::SqlCommandInfo::args
list< auto > args
the arguments for the string
Definition: SqlUtil.qm.dox.h:2219
SqlUtil::InsertOperatorInfo
insert operator info hash as returned by all insert operator functions
Definition: SqlUtil.qm.dox.h:2165
SqlUtil::AbstractColumn::qore_type
*string qore_type
the equivalent qore type name of the column if known
Definition: SqlUtil.qm.dox.h:5271
SqlUtil::ForeignConstraints::take
AbstractForeignConstraint take(string k)
removes the given key from the contained hash and returns the value
SqlUtil::op_ne
hash< OperatorInfo > op_ne(auto arg)
returns an OperatorInfo hash for the "!=" or "<>" operator with the given argument for use in where c...
SqlUtil::GenericColumnInfo::native_type
string native_type
the native database column type; if both native_type and qore_type are given then native_type is used
Definition: SqlUtil.qm.dox.h:2132
SqlUtil::GenericColumnInfo::size
softint size
for data types requiring a size component, the size; for numeric columns this represents the precisio...
Definition: SqlUtil.qm.dox.h:2134
SqlUtil::SqlCommandInfo::sql
string sql
the SQL string for the update
Definition: SqlUtil.qm.dox.h:2216
SqlUtil::COP_LAST_VALUE
const COP_LAST_VALUE
Analytic (window) function: LAST_VALUE.
Definition: SqlUtil.qm.dox.h:2461
SqlUtil::Indexes::take
AbstractIndex take(string k)
removes the given key from the contained hash and returns the value
SqlUtil::JoinOperatorInfo::ta
*string ta
optional table name or alias of the other table to join with when not joining with the primary table
Definition: SqlUtil.qm.dox.h:2184
SqlUtil::cop_coalesce
hash< ColumnOperatorInfo > cop_coalesce(auto col1, auto col2)
returns a ColumnOperatorInfo hash for the "coalesce" operator with the given column arguments; the fi...
SqlUtil::UpdateOperatorInfo
update operator info hash as returned by all update operator functions
Definition: SqlUtil.qm.dox.h:2171
SqlUtil::AbstractFunction
base class for functions
Definition: SqlUtil.qm.dox.h:5943
SqlUtil::AbstractHashContainer::matchKeys
bool matchKeys(list< auto > l)
returns True if the list<auto> argument has the same list of key strings as the keys in the object (i...
SqlUtil::AbstractIndex::equalImpl
abstract bool equalImpl(AbstractIndex ix)
returns True if the argument is equal to the current index, False if not
SqlUtil::cop_dense_rank
hash< ColumnOperatorInfo > cop_dense_rank()
Analytic/window function: rank of the current row without gaps.
SqlUtil::DB_PACKAGES
const DB_PACKAGES
Feature: packages.
Definition: SqlUtil.qm.dox.h:2233
SqlUtil::AbstractForeignConstraint::equalImpl
bool equalImpl(AbstractConstraint con)
returns True if the argument is equal to the current object, False if not
SqlUtil::cop_upper
hash< ColumnOperatorInfo > cop_upper(auto column)
returns a ColumnOperatorInfo hash for the "upper" operator with the given argument; returns a column ...
SqlUtil::AbstractConstraint::getRenameSql
abstract list< auto > getRenameSql(string table_name, string new_name)
returns a list of SQL strings that can be used to rename the constraint in the database
SqlUtil::AbstractDdlObject::constructor
constructor(string name)
creates the object from the name
SqlUtil::JOP_LEFT
const JOP_LEFT
for left outer joins
Definition: SqlUtil.qm.dox.h:3597
SqlUtil::uop_append
hash< UpdateOperatorInfo > uop_append(string arg, *hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "append" or concatenate operator with the given argument
SqlUtil::AbstractTrigger::constructor
constructor(string n, string n_src)
creates the object and sets its name and the trigger source
SqlUtil::BLOB
const BLOB
specifies a large variable-length binary column (ie BLOB or BYTEA, etc)
Definition: SqlUtil.qm.dox.h:2262
SqlUtil::AbstractColumn::nullable
bool nullable
True if the column can hold a NULL value, False if not
Definition: SqlUtil.qm.dox.h:5277
SqlUtil::make_iop
hash< InsertOperatorInfo > make_iop(string iop, auto arg)
returns an InsertOperatorInfo hash
Qore::ListIterator
SqlUtil::OP_GE
const OP_GE
the SQL greater than or equals operator (>=) for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4096
SqlUtil::OP_GT
const OP_GT
the SQL greater than operator (>) for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4091
SqlUtil::Constraints::getElementName
string getElementName()
must return the name of the contained element
SqlUtil::join_right_alias
hash< string, hash< JoinOperatorInfo > > join_right_alias(string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt)
returns a hash for right outer joins with the given arguments for use when joining with a table other...
SqlUtil::GenericColumnInfo::qore_type
string qore_type
a qore type string that will be converted to a native DB type with some default conversion
Definition: SqlUtil.qm.dox.h:2130
SqlUtil::AbstractFunctionBase::getNormalizedSource
string getNormalizedSource(string src)
returns normalized source for comparisons
SqlUtil::OP_BETWEEN
const OP_BETWEEN
the SQL "between" operator for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4141
SqlUtil::cop_percent_rank
hash< ColumnOperatorInfo > cop_percent_rank()
Analytic/window function: relative rank of the current row.
SqlUtil::COP_TRUNC_DATE
const COP_TRUNC_DATE
to return the date with truncated value
Definition: SqlUtil.qm.dox.h:2433
SqlUtil::JOP_INNER
const JOP_INNER
for standard inner joins
Definition: SqlUtil.qm.dox.h:3592
SqlUtil::AbstractColumnSupportingConstraint::index
*string index
the index supporting the constraint
Definition: SqlUtil.qm.dox.h:5646
SqlUtil::uop_minus
hash< UpdateOperatorInfo > uop_minus(auto arg, *hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "-" operator with the given arguments
SqlUtil::Functions::take
AbstractFunction take(string k)
removes the given key from the contained hash and returns the value
SqlUtil::COP_NTILE
const COP_NTILE
Analytic (window) function: NTILE.
Definition: SqlUtil.qm.dox.h:2468
SqlUtil::OP_NOT
const OP_NOT
the SQL "not" operator for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4151
SqlUtil::NumericColumnInfo
the base class to use to extend AbstractColumn to implement numeric columns
Definition: SqlUtil.qm.dox.h:5378
SqlUtil::AbstractHashContainer::val
bool val()
Returns False if the contained hash has no keys, True if it does.
SqlUtil::AbstractColumnSupportingConstraint::constructor
constructor(string n, Columns c, *string n_index)
creates the object from the name and a Columns object
SqlUtil::ForeignConstraintTarget::equal
bool equal(ForeignConstraintTarget targ)
returns True if the argument is equal to the current object, False if not
SqlUtil::Functions
function container class that throws an exception if an unknown function is accessed
Definition: SqlUtil.qm.dox.h:5969
SqlUtil::AbstractIndex::constraint
*AbstractColumnSupportingConstraint constraint
the AbstractColumnSupportingConstraint that this index supports, if any
Definition: SqlUtil.qm.dox.h:5453
SqlUtil::AbstractIndex::getDropSql
string getDropSql(string table_name)
returns a string that can be used to drop the index from the database
SqlUtil::AbstractForeignConstraint::target
ForeignConstraintTarget target
a ForeignConstraintTarget object to describe the target table and columns
Definition: SqlUtil.qm.dox.h:5813
SqlUtil::cop_minus
hash< ColumnOperatorInfo > cop_minus(auto column1, auto column2)
returns a ColumnOperatorInfo hash for the "-" operator with the given arguments
SqlUtil::AbstractForeignConstraint
the base class for foreign key constraint information
Definition: SqlUtil.qm.dox.h:5809
SqlUtil::AbstractSequence::getRenameSql
abstract softlist< auto > getRenameSql(string new_name, *hash< auto > opt)
returns a list of strings that can be used to rename the sequence in the database
SqlUtil::ColumnOperatorInfo::column
auto column
column sopecifier, may be a string or a complex hash
Definition: SqlUtil.qm.dox.h:2160
SqlUtil::SqlUtilDataTypeOptionInfo::number_format
*string number_format
optional format string for converting strings to numeric / decimal / number columns
Definition: SqlUtil.qm.dox.h:2200
SqlUtil::COP_APPEND
const COP_APPEND
to append a string to a column on output
Definition: SqlUtil.qm.dox.h:2307
SqlUtil::op_substr
hash< OperatorInfo > op_substr(int start, *int count, string text)
returns an OperatorInfo hash for the "substr" operator with the given arguments; for use in where cla...
SqlUtil::GenericColumnInfo::default_value_native
bool default_value_native
a boolean flag to say if a default_value should be validated against table column type (False) or use...
Definition: SqlUtil.qm.dox.h:2140
SqlUtil::JoinOperatorInfo::jop
string jop
the join operator string code
Definition: SqlUtil.qm.dox.h:2179
SqlUtil::wop_or
hash< string, hash< OperatorInfo > > wop_or(hash h1, hash h2)
returns an OperatorInfo hash with a fake "_OR_" column name; the list of arguments to the function is...
SqlUtil::DT_DAY
const DT_DAY
Format unit: day.
Definition: SqlUtil.qm.dox.h:3374
SqlUtil::AbstractHashContainer::clear
clear()
purges the contained data
SqlUtil::AbstractFunctionBase::getDropSql
string getDropSql(*hash< auto > opt)
returns a string that can be used to drop the function from the database
SqlUtil::AbstractHashContainer::empty
bool empty()
returns True if the container is empty, False if not
SqlUtil::AbstractCheckConstraint::setIndexBase
bool setIndexBase(string ix)
returns True if the object supports an index property and is set, False if not
SqlUtil::Table
represents a database table; this class embeds an AbstractTable object that is created automatically ...
Definition: Table.qc.dox.h:50
SqlUtil::cop_sum
hash< ColumnOperatorInfo > cop_sum(auto column)
returns a ColumnOperatorInfo hash for the "sum" operator; returns the total sum of a numeric column.
SqlUtil::SqlUtilDataTypeOptionInfo::mandatory
*softbool mandatory
optional flag to overrude any nullable attribute and require data for the column
Definition: SqlUtil.qm.dox.h:2203
SqlUtil::uop_lower
hash< UpdateOperatorInfo > uop_lower(*hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "lower" operator with the given argument; returns a column...
SqlUtil::AbstractCheckConstraint::equalImpl
bool equalImpl(AbstractConstraint c)
returns True if the argument is equal to the current object, False if not
SqlUtil::ColumnOperatorInfo
column operator info hash as returned by all column operator functions
Definition: SqlUtil.qm.dox.h:2158
SqlUtil::AbstractColumn::constructor
constructor()
empty constructor for subclasses
SqlUtil::cop_substr
hash< ColumnOperatorInfo > cop_substr(auto column, int start, *int count)
returns a ColumnOperatorInfo hash for the "substr" operator with the given arguments; returns a subst...
SqlUtil::cop_first_value
hash< ColumnOperatorInfo > cop_first_value(any column)
Analytic/window function: value evaluated at the row that is the first row of the window frame.
SqlUtil::AbstractIndex::unique
bool unique
True if the index is a unique index, False if not
Definition: SqlUtil.qm.dox.h:5446
SqlUtil::Indexes::memberGate
AbstractIndex memberGate(string k)
returns the AbstractIndex object corresponding to the key given or throws a KEY-ERROR exception
SqlUtil::GenericColumnInfo
generic column description hash in schema descriptions
Definition: SqlUtil.qm.dox.h:2128
SqlUtil::Tables::getDropConstraintIfExistsSql
*string getDropConstraintIfExistsSql(string tname, string cname, *hash< auto > opts)
returns an SQL string that can be used to drop an existing constraint on a table, if the table is not...
SqlUtil::cop_lower
hash< ColumnOperatorInfo > cop_lower(auto column)
returns a ColumnOperatorInfo hash for the "lower" operator with the given argument; returns a column ...
SqlUtil::AbstractColumnSupportingConstraint::hasColumn
bool hasColumn(string cname)
returns True if the constraint references the named column
SqlUtil::AbstractConstraint::equalImpl
abstract bool equalImpl(AbstractConstraint c)
returns True if the argument is equal to the current object, False if not
SqlUtil::VARCHAR
const VARCHAR
specifies a VARCHAR column (equivalent to Qore::Type::String)
Definition: SqlUtil.qm.dox.h:2253
SqlUtil::Functions::add
add(string k, AbstractFunction val)
adds the given value to the hash with the given key name
SqlUtil::COP_SEQ
const COP_SEQ
to return the next value of a sequence
Definition: SqlUtil.qm.dox.h:2402
SqlUtil::AbstractConstraint::getDropSql
string getDropSql(string table_name)
returns a string that can be used to drop the constraint from the database
SqlUtil::SqlUtilDataTypeOptionInfo
column data type options
Definition: SqlUtil.qm.dox.h:2189
SqlUtil::cop_ntile
hash< ColumnOperatorInfo > cop_ntile(int value)
Analytic/window function: integer ranging from 1 to the argument value, dividing the partition as equ...
SqlUtil::NumericColumnInfo::scale
int scale
the scale for numeric columns
Definition: SqlUtil.qm.dox.h:5382
SqlUtil::DefaultIopMap
const DefaultIopMap
a hash of default insert operator descriptions (currently empty, all operators are driver-dependent)
Definition: SqlUtil.qm.dox.h:4553
SqlUtil::AbstractColumnSupportingConstraint::setIndexBase
bool setIndexBase(string ix)
returns True if the object supports an index property and is set, False if not
SqlUtil::uop_plus
hash< UpdateOperatorInfo > uop_plus(auto arg, *hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "+" operator with the given arguments
SqlUtil::AbstractHashContainer::size
int size()
Returns the number of keys in the contained hash.
SqlUtil::Columns::constructor
constructor(Columns old)
creates a copy of the object
SqlUtil::COP_MAX
const COP_MAX
to return the maximum value
Definition: SqlUtil.qm.dox.h:2337
SqlUtil::COP_SUBSTR
const COP_SUBSTR
to extract a substring from a column
Definition: SqlUtil.qm.dox.h:2417
SqlUtil::AbstractHashContainer::hasKey
bool hasKey(string k)
Returns True if the key exists in the contained hash (may or may not be assigned a value),...
SqlUtil::AbstractListContainer::val
bool val()
Returns False if the contained list is empty, True if not.
SqlUtil::COP_DISTINCT
const COP_DISTINCT
to return distinct values
Definition: SqlUtil.qm.dox.h:2327
SqlUtil::op_not
hash< OperatorInfo > op_not(hash arg)
returns an OperatorInfo hash for the "not" operator; for use in where clauses
SqlUtil::AbstractListContainer
abstract container class that throws an exception if an unknown key is accessed
Definition: SqlUtil.qm.dox.h:4907
SqlUtil::DB_TABLES
const DB_TABLES
Feature: tables.
Definition: SqlUtil.qm.dox.h:2239
SqlUtil::ForeignConstraints::memberGate
AbstractForeignConstraint memberGate(string k)
returns the AbstractForeignConstraint object corresponding to the key given or throws a KEY-ERROR exc...
SqlUtil::SqlCommandInfo
A hash describing SQL and arguments for an SQL DML command.
Definition: SqlUtil.qm.dox.h:2214
SqlUtil::AbstractColumn::equalImpl
abstract bool equalImpl(AbstractColumn c)
returns True if the argument is equal to the current object, False if not
SqlUtil::Triggers::memberGate
AbstractTrigger memberGate(string k)
returns the AbstractTrigger object corresponding to the key given or throws a KEY-ERROR exception
SqlUtil::Columns::getElementName
string getElementName()
returns "column" since this object stores column objects
SqlUtil::uop_substr
hash< UpdateOperatorInfo > uop_substr(int start, *int count, *hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "substr" operator with the given arguments; returns a subs...
SqlUtil::JoinOperatorInfo::alias
*string alias
optional alias for table in the query
Definition: SqlUtil.qm.dox.h:2181
SqlUtil::Indexes::findEqual
*AbstractIndex findEqual(AbstractIndex ix)
find an index with columns equal to the index passed
SqlUtil::AbstractSequence::start
number start
the starting number
Definition: SqlUtil.qm.dox.h:5833
SqlUtil::AbstractColumnSupportingConstraint::constructor
constructor(string n, *hash c, *string n_index)
creates the object from the name and a hash of column information
SqlUtil::COP_CAST
const COP_CAST
to convert column value into another datatype
Definition: SqlUtil.qm.dox.h:2297
SqlUtil::JoinOperatorInfo::opt
*hash< auto > opt
optional join options (for example, to specify a partition for the join if supported)
Definition: SqlUtil.qm.dox.h:2185
SqlUtil::cop_distinct
hash< ColumnOperatorInfo > cop_distinct(auto column)
returns a ColumnOperatorInfo hash for the "distinct" operator with the given argument; returns distin...
SqlUtil::AbstractTrigger::getCreateSql
abstract list< auto > getCreateSql(string table_name, *hash< auto > opt)
returns a string that can be used to create the trigger in the database
SqlUtil::COP_PLUS
const COP_PLUS
the SQL "plus" operator
Definition: SqlUtil.qm.dox.h:2367
SqlUtil::uop_multiply
hash< UpdateOperatorInfo > uop_multiply(auto arg, *hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "*" operator with the given arguments
SqlUtil::op_eq
hash< OperatorInfo > op_eq(auto arg)
returns an OperatorInfo hash for the "=" operator with the given argument for use in where clauses wh...
SqlUtil::AbstractColumn
the base class for column information
Definition: SqlUtil.qm.dox.h:5264
SqlUtil::AbstractIndex::getRecreateSql
list< auto > getRecreateSql(AbstractDatasource ds, string table_name, *hash< auto > opt)
returns a list of strings to drop and recreate the current index; if there are dependent constraints,...
SqlUtil::Tables::add
add(string k, AbstractTable val)
adds the given value to the hash with the given key name
SqlUtil::AbstractIndex
the abstract base class for index information
Definition: SqlUtil.qm.dox.h:5439
SqlUtil::Indexes::add
add(string k, AbstractIndex val)
adds the given value to the hash with the given key name
SqlUtil::Columns::getSqlColumnNameIterator
AbstractIterator getSqlColumnNameIterator()
returns an iterator for column SQL names
SqlUtil::AbstractColumn::comment
*string comment
comment on the column
Definition: SqlUtil.qm.dox.h:5283
SqlUtil::op_clt
hash< OperatorInfo > op_clt(string arg)
returns an OperatorInfo hash for the "<" operator with the given argument for use in where clauses wh...
SqlUtil::cop_min
hash< ColumnOperatorInfo > cop_min(auto column)
returns a ColumnOperatorInfo hash for the "min" operator; returns minimum column values
SqlUtil::make_cop
hash< ColumnOperatorInfo > make_cop(string cop, auto column, auto arg)
returns a ColumnOperatorInfo hash
SqlUtil::OP_IN
const OP_IN
the SQL "in" operator for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4146
SqlUtil::COP_MULTIPLY
const COP_MULTIPLY
the SQL "multiply" operator
Definition: SqlUtil.qm.dox.h:2377
SqlUtil::AbstractConstraint::getDisableSql
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database; if disabli...
SqlUtil::COP_PERCENT_RANK
const COP_PERCENT_RANK
Analytic (window) function: PERCENT_RANK.
Definition: SqlUtil.qm.dox.h:2475
SqlUtil::Indexes::tryTake
*AbstractIndex tryTake(string k)
tries to remove the given key from the contained hash and returns the value if it exists
SqlUtil::AbstractListContainer::iterator
Qore::ListIterator iterator()
Returns a ListIterator object for the contained list.
SqlUtil::Tables::getDropAllForeignConstraintsOnTableSql
*list< auto > getDropAllForeignConstraintsOnTableSql(string name, *hash< auto > opt)
returns a list of SQL strings that can be used to drop all the foreign constraints on a particular ta...
SqlUtil::Constraints::add
add(string k, AbstractConstraint val)
adds the given value to the hash with the given key name
SqlUtil::ForeignConstraints::add
add(string k, AbstractForeignConstraint val)
adds the given value to the hash with the given key name
SqlUtil::cop_cume_dist
hash< ColumnOperatorInfo > cop_cume_dist()
Analytic/window function: relative rank of the current row.
SqlUtil::OP_LT
const OP_LT
the SQL less than (<) operator for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4081
SqlUtil::AbstractColumn::getNativeTypeString
string getNativeTypeString()
returns the string describing the native type that can be used in SQL (for example to add the colunn ...
SqlUtil::join_left
hash< string, hash< JoinOperatorInfo > > join_left(AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt)
returns a hash for left outer joins with the given arguments
SqlUtil::AbstractDdlObject::ddl_name
string ddl_name
the name of the object for DDL (in case it's a reserved word)
Definition: SqlUtil.qm.dox.h:5245
SqlUtil::AbstractIndex::getCreateSql
abstract string getCreateSql(string table_name, *hash< auto > opt)
returns a string that can be used to create the index in the database
SqlUtil::cop_plus
hash< ColumnOperatorInfo > cop_plus(auto column1, auto column2)
returns a ColumnOperatorInfo hash for the "+" operator with the given arguments
SqlUtil::op_gt
hash< OperatorInfo > op_gt(auto arg)
returns an OperatorInfo hash for the ">" operator with the given argument for use in where clauses wh...
SqlUtil::AbstractColumn::getModifySqlImpl
abstract list< auto > getModifySqlImpl(AbstractTable t, AbstractColumn c, *hash< auto > opt)
returns a list of sql strings that can be used to modify the column to the new definition; if the col...
SqlUtil::AbstractConstraint::getCreateSql
abstract string getCreateSql(string table_name, *hash< auto > opt)
returns a string that can be used to create the constraint in the database
SqlUtil::AbstractView::constructor
constructor(string n_name, string n_src)
creates the object from the arguments
SqlUtil::AbstractHashContainer
abstract container class that throws an exception if an unknown key is accessed
Definition: SqlUtil.qm.dox.h:4626
SqlUtil::JoinOperatorInfo::cond
*hash cond
additional conditions for the join clause for the table argument; see Where Clauses for more informat...
Definition: SqlUtil.qm.dox.h:2183
SqlUtil::JoinOperatorInfo
join operator info hash as returned by all join operator functions
Definition: SqlUtil.qm.dox.h:2178
SqlUtil::AbstractColumn::def_val
*string def_val
default value for column
Definition: SqlUtil.qm.dox.h:5280
SqlUtil::DT_MINUTE
const DT_MINUTE
Format unit: minute.
Definition: SqlUtil.qm.dox.h:3380
SqlUtil::DB_FUNCTIONS
const DB_FUNCTIONS
Features constants.
Definition: SqlUtil.qm.dox.h:2229
SqlUtil::AbstractColumnSupportingConstraint::getIndex
*string getIndex()
returns the name of the associated index, if any
SqlUtil::AbstractColumn::getCreateSql
string getCreateSql(AbstractTable t)
returns an sql string that can be used to add the column to a table
SqlUtil::AbstractFunctionBase::name
string name
the name of the object
Definition: SqlUtil.qm.dox.h:5902
SqlUtil::DT_YEAR
const DT_YEAR
Format unit: year.
Definition: SqlUtil.qm.dox.h:3368
SqlUtil::AbstractCheckConstraint
abstract class for check constraints
Definition: SqlUtil.qm.dox.h:5612
SqlUtil::COP_SUM
const COP_SUM
to return the sum value
Definition: SqlUtil.qm.dox.h:2347
SqlUtil::AbstractView::src
string src
the source code
Definition: SqlUtil.qm.dox.h:5872
SqlUtil::AbstractHashContainer::h
*hash h
the data to be contained
Definition: SqlUtil.qm.dox.h:4633
SqlUtil::AbstractCheckConstraint::constructor
constructor(string n, string n_src)
creates the object and sets its name and the check clause source
SqlUtil::ForeignConstraints::getElementName
string getElementName()
returns "foreign constraint" for the type of object encapsulated
SqlUtil::OP_CGT
const OP_CGT
the SQL greater than operator (>) for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4121
list
list< auto > list(...)
SqlUtil::AbstractIndex::setSupportingConstraint
setSupportingConstraint()
clears the supporting constraint
SqlUtil::AbstractIndex::getRenameSql
abstract string getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the index in the database
SqlUtil::cop_year_hour
hash< ColumnOperatorInfo > cop_year_hour(auto column)
returns a ColumnOperatorInfo hash for the "year_hour" operator with the given argument
SqlUtil::OperatorInfo::op
string op
the operator string code
Definition: SqlUtil.qm.dox.h:2153
SqlUtil::AbstractView::getRenameSql
abstract softlist< auto > getRenameSql(string new_name, *hash< auto > opt)
returns a list with command(s) that can be used to rename the view in the database
SqlUtil::AbstractIndex::constructor
constructor(string n, bool u, hash c)
creates the object from the name, a unique flag, and a hash of column information
SqlUtil::ForeignConstraints::findConstraintOn
*hash findConstraintOn(string table, softlist cols)
returns either a hash of AbstractColumn information or NOTHING if no foreign constraint can be found ...
SqlUtil::AbstractColumnSupportingConstraint::findMatchingIndex
findMatchingIndex(*Indexes indexes)
find an index that matches the constraint and marks both objects as related
SqlUtil::JoinOperatorInfo::jcols
*hash jcols
the columns to use for the join, the keys will be columns in the source table and the values are colu...
Definition: SqlUtil.qm.dox.h:2182
SqlUtil::COP_YEAR_HOUR
const COP_YEAR_HOUR
to return a date value with year to hextern information
Definition: SqlUtil.qm.dox.h:2397
SqlUtil::AbstractFunctionBase
base class for function or objects with code
Definition: SqlUtil.qm.dox.h:5898
SqlUtil::JoinOperatorInfo::table
auto table
the table to join with (either an AbstractTable object or a string table name)
Definition: SqlUtil.qm.dox.h:2180
SqlUtil::AbstractColumn::getRenameSql
abstract string getRenameSql(AbstractTable t, string new_name)
returns a string that can be used to rename the column
SqlUtil::cop_year_month
hash< ColumnOperatorInfo > cop_year_month(auto column)
returns a ColumnOperatorInfo hash for the "year_month" operator with the given argument
SqlUtil::UpdateOperatorInfo::uop
string uop
the update operator string code
Definition: SqlUtil.qm.dox.h:2172
SqlUtil::cop_avg
hash< ColumnOperatorInfo > cop_avg(auto column)
returns a ColumnOperatorInfo hash for the "avg" operator; returns average column values
SqlUtil::AbstractConstraint::rename
rename(string n)
renames the constraint
SqlUtil::COP_YEAR_DAY
const COP_YEAR_DAY
to return a date value with year to day information
Definition: SqlUtil.qm.dox.h:2392
SqlUtil::DefaultOpMap
const DefaultOpMap
a hash of valid operators for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4169
SqlUtil::cop_multiply
hash< ColumnOperatorInfo > cop_multiply(auto column1, auto column2)
returns a ColumnOperatorInfo hash for the "*" operator with the given arguments
SqlUtil::cop_year_day
hash< ColumnOperatorInfo > cop_year_day(auto column)
returns a ColumnOperatorInfo hash for the "year_day" operator with the given argument
SqlUtil::AbstractListContainer::get
abstract auto get(softint i)
returns the value of the given element in the contained list if it exists, otherwise throws an ELEMEN...
SqlUtil::COP_LOWER
const COP_LOWER
to return column value in lower case
Definition: SqlUtil.qm.dox.h:2322
SqlUtil::SqlUtilDataTypeOptionInfo::data_timezone
*TimeZone data_timezone
the timezone when converting dates from external data to the DB's date
Definition: SqlUtil.qm.dox.h:2194
SqlUtil::AbstractColumn::getModifySql
list< auto > getModifySql(AbstractTable t, AbstractColumn c, *hash< auto > opt)
returns a list of sql strings that can be used to modify the column to the new definition; if the col...
SqlUtil::AbstractHashContainer::matchKeys
bool matchKeys(AbstractHashContainer c)
returns True if the container argument has the same keys (in any order), False if not
SqlUtil::AbstractHashContainer::copy
copy(AbstractHashContainer old)
creates a "deep copy" of the object
SqlUtil::DB_TYPES
const DB_TYPES
Feature: named types.
Definition: SqlUtil.qm.dox.h:2241
SqlUtil::Columns
column container class that throws an exception if an unknown column is accessed
Definition: SqlUtil.qm.dox.h:5182
SqlUtil::Constraints::take
AbstractConstraint take(string k)
removes the given key from the contained hash and returns the value
SqlUtil::Indexes
index container class that throws an exception if an unknown index is accessed
Definition: SqlUtil.qm.dox.h:5393
SqlUtil::COP_SEQ_CURRVAL
const COP_SEQ_CURRVAL
to return the last value of a sequence issued in the same session
Definition: SqlUtil.qm.dox.h:2407
SqlUtil::op_le
hash< OperatorInfo > op_le(auto arg)
returns an OperatorInfo hash for the "<=" operator with the given argument for use in where clauses w...
SqlUtil::AbstractTable
the base abstract class for the table implementation
Definition: AbstractTable.qc.dox.h:36
SqlUtil::AbstractListContainer::getList
list< auto > getList()
returns the list contained by this object
SqlUtil::cop_append
hash< ColumnOperatorInfo > cop_append(auto column, string arg)
returns a ColumnOperatorInfo hash for the "append" operator with the given argument
SqlUtil::AbstractSequence::increment
number increment
the increment
Definition: SqlUtil.qm.dox.h:5836
SqlUtil::SZ_MAND
const SZ_MAND
the data type takes a mandatory size parameter
Definition: SqlUtil.qm.dox.h:2276
SqlUtil::COP_PREPEND
const COP_PREPEND
to prepend a string to a column on output
Definition: SqlUtil.qm.dox.h:2302
SqlUtil::AbstractColumnSupportingConstraint::removeSourceConstraint
removeSourceConstraint(string tname, list cols)
removes a source constraint
SqlUtil::AbstractColumnSupportingConstraint::getDisableReenableSql
hash< auto > getDisableReenableSql(AbstractDatasource ds, string table_name, *hash< auto > opts)
returns lists of SQL strings to disable this constraint plus any dependent constraints and another li...
SqlUtil::cop_prepend
hash< ColumnOperatorInfo > cop_prepend(auto column, string arg)
returns a ColumnOperatorInfo hash for the "prepend" operator with the given argument
SqlUtil::UpdateOperatorInfo::arg
auto arg
optional argument
Definition: SqlUtil.qm.dox.h:2173
SqlUtil::sqlutil_register_ds_deserializer
sqlutil_register_ds_deserializer(*code new_ds_get)
registers a closure or call reference taking a string type and string datasource configuration that w...
SqlUtil::GenericColumnInfo::notnull
bool notnull
if the column should have a "not null" constraint on it; if missing the default value is False
Definition: SqlUtil.qm.dox.h:2144
SqlUtil::InsertOperatorInfo::_iop
string _iop
the insert operator string code
Definition: SqlUtil.qm.dox.h:2166
SqlUtil::AbstractConstraint::constructor
constructor(string n)
creates the object and sets its name
SqlUtil::Tables::dropIterator
Qore::AbstractIterator dropIterator()
returns an iterator for a list of cached table names in the order that can be used to drop the tables...
hash
hash< auto > hash(object obj)
SqlUtil::DB_VIEWS
const DB_VIEWS
Feature: views.
Definition: SqlUtil.qm.dox.h:2243
SqlUtil::AbstractColumnSupportingConstraint
the API for a constraint with columns
Definition: SqlUtil.qm.dox.h:5638
SqlUtil::Tables::tableRenamed
bool tableRenamed(string old_name, string new_name, string old_sql_name)
updates table names and internal references for renamed tables
SqlUtil::AbstractView::updatable
bool updatable
Flag showing if is the view updatable with DML commands.
Definition: SqlUtil.qm.dox.h:5875
SqlUtil::AbstractColumnSupportingConstraint::sourceConstraints
*hash sourceConstraints
a hash of ForeignConstraintSources, keyed by table name, the value is a hash of foreign constraints k...
Definition: SqlUtil.qm.dox.h:5643
SqlUtil::ForeignConstraintTarget::table
string table
the name of the target table
Definition: SqlUtil.qm.dox.h:5794
SqlUtil::AbstractHashContainer::renameKey
renameKey(string old_name, string new_name)
renames the given key; maintains the key order
SqlUtil::Triggers
trigger container class that throws an exception if an unknown trigger is accessed
Definition: SqlUtil.qm.dox.h:6025
SqlUtil::uop_prepend
hash< UpdateOperatorInfo > uop_prepend(string arg, *hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "prepend" operator with the given argument
SqlUtil::AbstractHashContainer::partialMatchKeys
bool partialMatchKeys(list< auto > l)
returns True if the list<auto> argument has at least the same keys (in any order, can have more keys)...
SqlUtil::DefaultUopMap
const DefaultUopMap
a hash of valid update operators
Definition: SqlUtil.qm.dox.h:3394
SqlUtil::ForeignConstraints::findEqual
*AbstractForeignConstraint findEqual(AbstractForeignConstraint fk)
find an index with columns equal to the index passed
SqlUtil::AbstractHashContainer::pairIterator
Qore::AbstractIterator pairIterator()
Returns a HashPairIterator object for the contained hash.
SqlUtil::cop_year
hash< ColumnOperatorInfo > cop_year(auto column)
returns a ColumnOperatorInfo hash for the "year" operator with the given argument
SqlUtil::cop_as
hash< ColumnOperatorInfo > cop_as(auto column, string arg)
returns a ColumnOperatorInfo hash for the "as" operator with the given argument
SqlUtil::AbstractListContainer::getElementName
abstract string getElementName()
must return the name of the contained element
SqlUtil::sqlutil_register_ds_serializer
sqlutil_register_ds_serializer(*code new_ds_do)
registers a closure or call reference taking a string type and string datasource configuration that w...
SqlUtil::ForeignConstraintTarget::constructor
constructor(string t, Columns c)
creates the object and sets the target table name and the target columns
SqlUtil::AbstractSequence::getCreateSql
abstract string getCreateSql(*hash< auto > opt)
returns a string that can be used to create the sequence in the database
SqlUtil::AbstractView::getDropSql
string getDropSql(*hash< auto > opt)
returns a string that can be used to drop the view from the database
SqlUtil::AbstractColumn::native_type
string native_type
the native type name of the column
Definition: SqlUtil.qm.dox.h:5268
SqlUtil::DB_PROCEDURES
const DB_PROCEDURES
Feature: procedures.
Definition: SqlUtil.qm.dox.h:2235
SqlUtil::AbstractTrigger::getDropSql
abstract list< auto > getDropSql(string table_name)
returns a string that can be used to drop the trigger in the database
SqlUtil::COP_DIVIDE
const COP_DIVIDE
the SQL "divide" operator
Definition: SqlUtil.qm.dox.h:2372
SqlUtil::OP_CLE
const OP_CLE
the SQL less than or equals (<=) operator for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4116
SqlUtil::uop_seq_currval
hash< UpdateOperatorInfo > uop_seq_currval(string seq)
returns an UpdateOperatorInfo hash for the "seq" operator with the given argument giving the sequence...
SqlUtil::Tables::getElementName
string getElementName()
returns "table" since this object stores AbstractTable objects
SqlUtil::AbstractHashContainer::values
list< auto > values()
Returns a list of values of the contained hash.
SqlUtil::AbstractColumn::getAddColumnSql
abstract list< auto > getAddColumnSql(AbstractTable t)
returns a list of sql strings that can be used to add the column to an existing table
SqlUtil::AbstractListContainer::size
int size()
Returns the number of elements in the contained list.
SqlUtil::OP_LE
const OP_LE
the SQL less than or equals (<=) operator for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4086
SqlUtil::AbstractDdlObject::getDdlName
abstract string getDdlName(string name)
returns the column name with quoting in case the column name is a reserved word
SqlUtil::SqlUtilDataTypeOptionInfo::date_format
*string date_format
optional format string for converting strings to dates for date / timestamp columns
Definition: SqlUtil.qm.dox.h:2191
SqlUtil::AbstractView
base class for views
Definition: SqlUtil.qm.dox.h:5862
SqlUtil::cop_over
hash< ColumnOperatorInfo > cop_over(auto column, *string partitionby, *string orderby)
returns a ColumnOperatorInfo hash for the "over" clause
SqlUtil::AbstractConstraint::hasColumn
bool hasColumn(string cname)
returns True if the constraint references the named column
SqlUtil::AbstractPrimaryKey
represents a primary key
Definition: SqlUtil.qm.dox.h:5732
SqlUtil::OP_CGE
const OP_CGE
the SQL greater than or equals operator (>=) for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4126
False
const False
SqlUtil::JopMap
const JopMap
a hash of valid join operators
Definition: SqlUtil.qm.dox.h:3605
SqlUtil::op_cgt
hash< OperatorInfo > op_cgt(string arg)
returns an OperatorInfo hash for the ">" operator with the given argument for use in where clauses wh...
SqlUtil::OP_OR
const OP_OR
to combine SQL expressions with "or" for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4161
SqlUtil::IOP_SEQ_CURRVAL
const IOP_SEQ_CURRVAL
for using the last value of a sequence issued in the current session
Definition: SqlUtil.qm.dox.h:4550
SqlUtil::SqlUtilDataTypeOptionInfo::maxlen
*softint maxlen
optional additional limit to the maximum length of the data
Definition: SqlUtil.qm.dox.h:2208
SqlUtil::COP_CUME_DIST
const COP_CUME_DIST
Analytic (window) function: CUME_DIST.
Definition: SqlUtil.qm.dox.h:2440
SqlUtil::AbstractColumnSupportingConstraint::clearIndex
clearIndex()
clears any index base for the constraint
SqlUtil::COP_MIN
const COP_MIN
to return the minimum value
Definition: SqlUtil.qm.dox.h:2332
SqlUtil::AbstractColumn::equal
bool equal(AbstractColumn c)
returns True if the argument is equal to the current object, False if not
SqlUtil::Tables::add
add(Table val)
adds the given value to the hash with the given key name
SqlUtil::AbstractConstraint::clearIndex
abstract clearIndex()
clears any index base for the constraint
SqlUtil::OP_SUBSTR
const OP_SUBSTR
the SQL "substr" operator for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4156
SqlUtil::AbstractView::getCreateSql
abstract string getCreateSql(*hash< auto > opt)
returns a string that can be used to create the view in the database
SqlUtil::NumericColumnInfo::getNativeTypeString
string getNativeTypeString(string native_type, int precision)
returns the string describing the native type that can be used in SQL (for example to add the column ...
SqlUtil::join_left_alias
hash< string, hash< JoinOperatorInfo > > join_left_alias(string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt)
returns a hash for left outer joins with the given arguments for use when joining with a table other ...
SqlUtil::AbstractHashContainer::hasKeyValue
bool hasKeyValue(string k)
Returns True if the key exists in the contained hash and is assigned a value, False if not.
SqlUtil::Indexes::getElementName
string getElementName()
must return the name of the contained element
SqlUtil::Tables::memberGate
AbstractTable memberGate(string k)
returns the AbstractTable object corresponding to the key given or throws a KEY-ERROR exception
SqlUtil::SqlUtilDataTypeOptionInfo::db_timezone
*TimeZone db_timezone
the timezone to use when sending date/time values to the DB
Definition: SqlUtil.qm.dox.h:2197
SqlUtil::cop_value
hash< ColumnOperatorInfo > cop_value(auto arg)
returns a ColumnOperatorInfo hash for the "value" (literal) operator with the given argument
SqlUtil::AbstractDdlObject
the base class for named objects
Definition: SqlUtil.qm.dox.h:5238
SqlUtil::AbstractHashContainer::constructor
constructor(*hash nh)
creates the object with the hash argument passed
SqlUtil::AbstractListContainer::empty
bool empty()
returns True if the container is empty, False if not
SqlUtil::AbstractCheckConstraint::src
string src
the source of the check clause
Definition: SqlUtil.qm.dox.h:5616
SqlUtil::AbstractListContainer::take
auto take(int i)
removes the given element from the contained list and returns the value
SqlUtil::AbstractHashContainer::getHash
*hash< auto > getHash()
returns the hash contained by this object
SqlUtil::Constraints
constraint container class that throws an exception if an unknown constraint is accessed
Definition: SqlUtil.qm.dox.h:5508
SqlUtil::Columns::memberGate
AbstractColumn memberGate(string k)
returns the AbstractColumn object corresponding to the key given or throws a KEY-ERROR exception
SqlUtil::make_uop
hash< UpdateOperatorInfo > make_uop(string uop, auto arg, *hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash
SqlUtil::cop_cast
hash< ColumnOperatorInfo > cop_cast(auto column, string arg, auto arg1, auto arg2)
returns a ColumnOperatorInfo hash for the "cast" operator with the given argument(s)
SqlUtil::Tables::take
AbstractTable take(string k)
removes the given key from the contained hash and returns the value
SqlUtil::AbstractConstraint::setIndexBase
abstract bool setIndexBase(string ix)
returns True if the object supports an index property and is set, False if not
SqlUtil::Constraints::memberGate
AbstractConstraint memberGate(string k)
returns the AbstractConstraint object corresponding to the key given or throws a KEY-ERROR exception
SqlUtil::op_cne
hash< OperatorInfo > op_cne(string arg)
returns an OperatorInfo hash for the "!=" or "<>" operator with the given argument for use in where c...
SqlUtil::cop_max
hash< ColumnOperatorInfo > cop_max(auto column)
returns a ColumnOperatorInfo hash for the "max" operator; returns maximum column values
SqlUtil::ForeignConstraintTarget::columns
Columns columns
columns in the target table
Definition: SqlUtil.qm.dox.h:5797
SqlUtil::AbstractColumn::size
int size
the size of the column
Definition: SqlUtil.qm.dox.h:5274
SqlUtil
Qore AbstractDatabase class definition.
Definition: AbstractDatabase.qc.dox.h:32
SqlUtil::AbstractFunctionBase::type
string type
the type of object
Definition: SqlUtil.qm.dox.h:5905
SqlUtil::AbstractColumnSupportingConstraint::getCreateSql
abstract string getCreateSql(string table_name, *hash< auto > opts)
returns a string that can be used to create the constraint in the database
SqlUtil::AbstractHashContainer::take
abstract auto take(string k)
removes the given key from the contained hash and returns the value
SqlUtil::op_between
hash< OperatorInfo > op_between(auto l, auto r)
returns an OperatorInfo hash for the "between" operator with the given arguments, neither of which ca...
SqlUtil::AbstractIndex::getSupportingConstraint
*AbstractColumnSupportingConstraint getSupportingConstraint()
returns the supporting constraint, if any
SqlUtil::COP_AS
const COP_AS
to rename a column on output
Definition: SqlUtil.qm.dox.h:2292
SqlUtil::op_ge
hash< OperatorInfo > op_ge(auto arg)
returns an OperatorInfo hash for the ">=" operator with the given argument for use in where clauses w...
SqlUtil::COP_VALUE
const COP_VALUE
to append a constant value (SQL Literal) to use as an output column value
Definition: SqlUtil.qm.dox.h:2312
SqlUtil::Tables::getIfExists
*AbstractTable getIfExists(AbstractDatasource ds, string name)
gets a table from the database or from the cache if already cached; if the table does not exist,...
SqlUtil::Tables::get
AbstractTable get(AbstractDatasource ds, string name)
gets a table from the database or from the cache if already cached
SqlUtil::AbstractColumnSupportingConstraint::renameSourceConstraintTable
renameSourceConstraintTable(string old_name, string new_name)
renames a table in a source constraint
SqlUtil::Tables
the table container class stores a collection of tables in a schema
Definition: SqlUtil.qm.dox.h:4996
SqlUtil::cop_count
hash< ColumnOperatorInfo > cop_count(auto column='')
returns a ColumnOperatorInfo hash for the "count" operator; returns row counts
SqlUtil::GenericColumnInfo::auto_increment
*bool auto_increment
True for DBs that support an auto-increment column
Definition: SqlUtil.qm.dox.h:2148
SqlUtil::AbstractConstraint::equal
bool equal(AbstractConstraint c)
returns True if the argument is equal to the current object, False if not
SqlUtil::AbstractUniqueConstraint::constructor
constructor(string n, *hash c, *string n_index)
creates the object from the name an a hash of column information
SqlUtil::COP_COALESCE
const COP_COALESCE
to return the first non-null argument in the list
Definition: SqlUtil.qm.dox.h:2412
SqlUtil::cop_last_value
hash< ColumnOperatorInfo > cop_last_value(any column)
Analytic/window function: value evaluated at the row that is the last row of the window frame.
SqlUtil::AbstractFunctionBase::equal
bool equal(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
SqlUtil::AbstractIndex::name
string name
the name of the index
Definition: SqlUtil.qm.dox.h:5443
SqlUtil::AbstractHashContainer::lastKey
*string lastKey()
Returns the last key name in the contained hash or NOTHING if the contained hash has no keys.
SqlUtil::op_ceq
hash< OperatorInfo > op_ceq(string arg)
returns an OperatorInfo hash for the "=" operator with the given argument for use in where clauses wh...
SqlUtil::JOP_RIGHT
const JOP_RIGHT
for right outer joins
Definition: SqlUtil.qm.dox.h:3602
SqlUtil::AbstractView::name
string name
the name of the sequence
Definition: SqlUtil.qm.dox.h:5869
SqlUtil::AbstractFunction::setName
setName(string new_name)
sets the new name of the object
SqlUtil::join_inner_alias
hash< string, hash< JoinOperatorInfo > > join_inner_alias(string ta, string table_name, *string alias, *hash jcols, *hash cond, *hash< auto > opt)
returns a hash for standard inner joins with the given arguments for use when joining with a table ot...
SqlUtil::AbstractTrigger::getRenameSql
abstract softlist< auto > getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the trigger in the database
SqlUtil::Tables::add
add(AbstractTable val)
adds the given value to the hash with the given key name
SqlUtil::Columns::constructor
constructor(*hash c)
creates the object from the argument
SqlUtil::Triggers::take
AbstractTrigger take(string k)
removes the given key from the contained hash and returns the value
SqlUtil::cop_seq_currval
hash< ColumnOperatorInfo > cop_seq_currval(string seq, *string as)
returns a ColumnOperatorInfo hash for the "seq_currval" operator with the given argument giving the s...
number
number number(softnumber n)
SqlUtil::AbstractHashContainer::constructor
constructor(AbstractHashContainer old)
creates a copy of the object
SqlUtil::OP_LIKE
const OP_LIKE
the SQL "like" operator for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4076
SqlUtil::uop_upper
hash< UpdateOperatorInfo > uop_upper(*hash< UpdateOperatorInfo > nest)
returns an UpdateOperatorInfo hash for the "upper" operator with the given argument; returns a column...
SqlUtil::AbstractListContainer::constructor
constructor(softlist nl)
creates the object with the list<auto> argument passed
SqlUtil::GenericColumnInfo::driver
hash< string, hash > driver
this key can optionally contain a hash keyed by driver name which contains a hash of values that will...
Definition: SqlUtil.qm.dox.h:2146
SqlUtil::OP_CLT
const OP_CLT
the SQL less than (<) operator for use in Where Clauses when comparing two columns
Definition: SqlUtil.qm.dox.h:4111
SqlUtil::AbstractColumnSupportingConstraint::getSourceConstraintIterator
Qore::AbstractIterator getSourceConstraintIterator()
returns an iterator through all known source foreign constraints on the current table
SqlUtil::AbstractDdlObject::name
string name
the name of the object
Definition: SqlUtil.qm.dox.h:5242
SqlUtil::make_op
hash< OperatorInfo > make_op(string op, auto arg)
returns an OperatorInfo hash
SqlUtil::Tables::add
add(string k, Table val)
adds the given value to the hash with the given key name
SqlUtil::AbstractDdlObject::constructor
constructor()
empty constructor for subclasses
SqlUtil::AbstractColumnSupportingConstraint::equalImpl
bool equalImpl(AbstractConstraint c)
returns True if the argument is equal to the current object, False if not
SqlUtil::CLOB
const CLOB
specifies a large variable-length character column (ie CLOB or TEXT, etc)
Definition: SqlUtil.qm.dox.h:2265
SqlUtil::ColumnOperatorInfo::cop
string cop
the column operator string code
Definition: SqlUtil.qm.dox.h:2159
SqlUtil::Tables::constructor
constructor()
creates an empty object
SqlUtil::join_inner
hash< string, hash< JoinOperatorInfo > > join_inner(AbstractTable table, *string alias, *hash jcols, *hash cond, *hash< auto > opt)
returns a hash for standard inner joins with the given arguments
SqlUtil::COP_RANK
const COP_RANK
Analytic (window) function: RANK.
Definition: SqlUtil.qm.dox.h:2482
SqlUtil::cop_seq
hash< ColumnOperatorInfo > cop_seq(string seq, *string as)
returns a ColumnOperatorInfo hash for the "seq" operator with the given argument giving the sequence ...
SqlUtil::AbstractColumn::getDropSql
string getDropSql(string table_name)
returns a string that can be used to drop the column from the table
Qore::AbstractIterator
SqlUtil::AbstractIndex::equalExceptName
bool equalExceptName(AbstractIndex ix)
returns True if the argument is equal to the current index with the exception of the name,...
SqlUtil::AbstractIndex::hasColumn
bool hasColumn(string cname)
returns True if the constraint references the named column
SqlUtil::OperatorInfo
SQL operator info hash as returned by all operator functions.
Definition: SqlUtil.qm.dox.h:2152
SqlUtil::cop_trunc_date
hash< ColumnOperatorInfo > cop_trunc_date(auto column, string mask)
Truncates a date column or value regarding the given mask. The resulting value remains Qore::date (no...
SqlUtil::op_lt
hash< OperatorInfo > op_lt(auto arg)
returns an OperatorInfo hash for the "<" operator with the given argument for use in where clauses wh...
SqlUtil::AbstractConstraint
abstract base class for constraints
Definition: SqlUtil.qm.dox.h:5550
SqlUtil::DB_MVIEWS
const DB_MVIEWS
Feature: materialized views / snapshots.
Definition: SqlUtil.qm.dox.h:2231
SqlUtil::AbstractFunctionBase::src
string src
the source of the object
Definition: SqlUtil.qm.dox.h:5908
SqlUtil::uop_seq
hash< UpdateOperatorInfo > uop_seq(string seq)
returns an UpdateOperatorInfo hash for the "seq" operator with the given argument giving the sequence...
SqlUtil::AbstractFunctionBase::equalImpl
abstract bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
SqlUtil::Columns::equal
bool equal(Columns cols)
returns True if the argument has the same columns in the same order as the current object,...
SqlUtil::Tables::populate
populate(AbstractDatasource ds, hash< auto > tables, *hash< auto > opt)
populates the object from a hash<auto> description
SqlUtil::DT_SECOND
const DT_SECOND
Format unit: hour.
Definition: SqlUtil.qm.dox.h:3383
SqlUtil::AbstractIndex::setSupportingConstraint
setSupportingConstraint(AbstractColumnSupportingConstraint c)
tags the index with a column supporting constraint (unique or fk constraint, etc) that the index supp...
SqlUtil::Columns::add
add(string k, AbstractColumn val)
adds the given value to the hash with the given key name
SqlUtil::COP_AVG
const COP_AVG
to return the average value
Definition: SqlUtil.qm.dox.h:2342
SqlUtil::Tables::getRenameTableIfExistsSql
*string getRenameTableIfExistsSql(string old_name, string new_name, *hash< auto > opts)
returns an SQL string that can be used to rename the given table if it exists and the target does not...
SqlUtil::COP_FIRST_VALUE
const COP_FIRST_VALUE
Analytic (window) function: FIRST_VALUE.
Definition: SqlUtil.qm.dox.h:2454
SqlUtil::AbstractListContainer::add
add(auto val)
adds the given value to the list
SqlUtil::AbstractHashContainer::matchKeys
bool matchKeys(hash h1)
returns True if the hash argument has the same keys (in any order), False if not
SqlUtil::OP_EQ
const OP_EQ
the SQL equals operator (=) for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4106
SqlUtil::AbstractSequence::name
string name
the name of the sequence
Definition: SqlUtil.qm.dox.h:5830
SqlUtil::UpdateOperatorInfo::nest
*hash nest
option nested operation hash
Definition: SqlUtil.qm.dox.h:2174
SqlUtil::GenericColumnInfo::default_value
auto default_value
the default value for the column
Definition: SqlUtil.qm.dox.h:2138
SqlUtil::SZ_NONE
const SZ_NONE
the data type does not take a size parameter
Definition: SqlUtil.qm.dox.h:2273
SqlUtil::DB_SYNONYMS
const DB_SYNONYMS
Feature: synonyms.
Definition: SqlUtil.qm.dox.h:2245
SqlUtil::Constraints::findEqualUniqueConstraint
*AbstractUniqueConstraint findEqualUniqueConstraint(AbstractUniqueConstraint uk)
finds a unique constraint with the same columns as the unique constraint passed
SqlUtil::OP_IN_SELECT
const OP_IN_SELECT
the SQL "in" operator with a select query for use in Where Clauses
Definition: SqlUtil.qm.dox.h:4166