1 | /* |
2 | * This Source Code Form is subject to the terms of the Mozilla Public |
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
5 | * |
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. |
7 | */ |
8 | |
9 | /* |
10 | * (author) M Kersten, N Nes |
11 | * SQL support implementation |
12 | * This module contains the wrappers around the SQL |
13 | * multi-version-catalog and support routines. |
14 | */ |
15 | #ifndef _SQL_H |
16 | #define _SQL_H |
17 | |
18 | #include "sql_mem.h" |
19 | |
20 | #ifdef WIN32 |
21 | #ifndef LIBSQL |
22 | #define sql5_export extern __declspec(dllimport) |
23 | #else |
24 | #define sql5_export extern __declspec(dllexport) |
25 | #endif |
26 | #else |
27 | #define sql5_export extern |
28 | #endif |
29 | |
30 | #include "mal_backend.h" |
31 | #include "sql_mvc.h" |
32 | #include "sql_backend.h" |
33 | #include "mal_session.h" |
34 | |
35 | #include "mal_function.h" |
36 | #include "mal_stack.h" |
37 | #include "mal_interpreter.h" |
38 | |
39 | #include "tablet.h" |
40 | #include "streams.h" |
41 | #include "mtime.h" |
42 | #include <math.h> |
43 | #include "blob.h" |
44 | #include "mkey.h" |
45 | #include "str.h" |
46 | #include "sql_privileges.h" |
47 | #include "sql_decimal.h" |
48 | #include "sql_string.h" |
49 | #include "sql_qc.h" |
50 | #include "sql_env.h" |
51 | #include "sql_statement.h" |
52 | #include "querylog.h" |
53 | |
54 | #include "bat/bat_storage.h" |
55 | #include "bat/bat_utils.h" |
56 | |
57 | extern int sqlcleanup(mvc *c, int err); |
58 | extern sql_rel *sql_symbol2relation(mvc *c, symbol *sym); |
59 | |
60 | extern BAT *mvc_bind(mvc *m, const char *sname, const char *tname, const char *cname, int access); |
61 | extern BAT *mvc_bind_idxbat(mvc *m, const char *sname, const char *tname, const char *iname, int access); |
62 | |
63 | sql5_export str SQLmvc(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
64 | sql5_export str SQLcommit(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
65 | sql5_export str SQLabort(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
66 | sql5_export str SQLshutdown_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
67 | sql5_export str SQLtransaction2(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
68 | sql5_export str SQLcatalog(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
69 | |
70 | sql5_export str mvc_grow_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
71 | sql5_export str mvc_append_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
72 | sql5_export str mvc_append_column(sql_trans *t, sql_column *c, BAT *ins); |
73 | |
74 | sql5_export str mvc_update_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
75 | sql5_export str mvc_bind_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
76 | sql5_export str mvc_delta_values(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
77 | sql5_export str mvc_bind_idxbat_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
78 | sql5_export str mvc_clear_table_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
79 | sql5_export str mvc_delete_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
80 | sql5_export str SQLtid(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
81 | sql5_export str DELTAbat(bat *result, const bat *col, const bat *uid, const bat *uval, const bat *ins); |
82 | sql5_export str DELTAsub(bat *result, const bat *col, const bat *cid, const bat *uid, const bat *uval, const bat *ins); |
83 | sql5_export str DELTAproject(bat *result, const bat *select, const bat *col, const bat *uid, const bat *uval, const bat *ins); |
84 | sql5_export str DELTAbat2(bat *result, const bat *col, const bat *uid, const bat *uval); |
85 | sql5_export str DELTAsub2(bat *result, const bat *col, const bat *cid, const bat *uid, const bat *uval); |
86 | sql5_export str DELTAproject2(bat *result, const bat *select, const bat *col, const bat *uid, const bat *uval); |
87 | |
88 | sql5_export str BATleftproject(bat *result, const bat *col, const bat *l, const bat *r); |
89 | |
90 | sql5_export str mvc_table_result_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
91 | |
92 | sql5_export str mvc_export_table_wrap( Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
93 | |
94 | sql5_export str mvc_affected_rows_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
95 | sql5_export str mvc_export_result_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
96 | sql5_export str mvc_export_head_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
97 | sql5_export str mvc_export_chunk_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
98 | sql5_export str mvc_export_operation_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
99 | sql5_export str mvc_scalar_value_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
100 | sql5_export str mvc_row_result_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
101 | sql5_export str mvc_export_row_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
102 | sql5_export str mvc_import_table_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
103 | sql5_export str mvc_bin_import_table_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
104 | sql5_export str setVariable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
105 | sql5_export str getVariable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
106 | sql5_export str sql_variables(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
107 | sql5_export str mvc_logfile(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
108 | sql5_export str mvc_next_value(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
109 | sql5_export str mvc_bat_next_value(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
110 | sql5_export str mvc_get_value(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
111 | sql5_export str mvc_bat_get_value(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
112 | sql5_export str mvc_getVersion(lng *r, const int *clientid); |
113 | sql5_export str mvc_restart_seq(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
114 | sql5_export str mvc_bat_restart_seq(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
115 | sql5_export str not_unique(bit *ret, const bat *bid); |
116 | sql5_export str SQLshrink(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
117 | sql5_export str SQLreuse(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
118 | sql5_export str SQLvacuum(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
119 | sql5_export str SQLdrop_hash(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
120 | sql5_export str SQLargRecord(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
121 | sql5_export str SQLoptimizersUpdate(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
122 | sql5_export str month_interval_str(int *ret, const str *s, const int *ek, const int *sk); |
123 | sql5_export str second_interval_str(lng *res, const str *s, const int *ek, const int *sk); |
124 | sql5_export str dump_cache(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
125 | sql5_export str dump_opt_stats(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
126 | sql5_export str dump_trace(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
127 | sql5_export str sql_sessions_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
128 | sql5_export str sql_rt_credentials_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
129 | sql5_export str sql_storage(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
130 | sql5_export str sql_querylog_catalog(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
131 | sql5_export str sql_querylog_calls(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
132 | sql5_export str sql_querylog_empty(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
133 | sql5_export str sql_rowid(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
134 | sql5_export str sql_rank_grp(bat *rid, const bat *bid, const bat *gid, const bat *gpe); |
135 | sql5_export str sql_rank(bat *rid, const bat *bid); |
136 | sql5_export str sql_dense_rank_grp(bat *rid, const bat *bid, const bat *gid, const bat *gpe); |
137 | sql5_export str sql_dense_rank(bat *rid, const bat *bid); |
138 | sql5_export str SQLidentity(oid *rid, const void *i); |
139 | sql5_export str BATSQLidentity(bat *rid, const bat *bid); |
140 | sql5_export str PBATSQLidentity(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
141 | sql5_export str create_table_or_view(mvc *sql, char* sname, char *tname, sql_table *t, int temp); |
142 | sql5_export str create_table_from_emit(Client cntxt, char *sname, char *tname, sql_emit_col *columns, size_t ncols); |
143 | sql5_export str append_to_table_from_emit(Client cntxt, char *sname, char *tname, sql_emit_col *columns, size_t ncols); |
144 | |
145 | sql5_export str bte_dec_round_wrap(bte *res, const bte *v, const bte *r); |
146 | sql5_export str bte_bat_dec_round_wrap(bat *res, const bat *v, const bte *r); |
147 | sql5_export str bte_round_wrap(bte *res, const bte *v, const int *d, const int *s, const bte *r); |
148 | sql5_export str bte_bat_round_wrap(bat *res, const bat *v, const int *d, const int *s, const bte *r); |
149 | sql5_export str str_2dec_bte(bte *res, const str *val, const int *d, const int *sc); |
150 | sql5_export str str_2num_bte(bte *res, const str *v, const int *len); |
151 | sql5_export str batstr_2dec_bte(bat *res, const bat *val, const int *d, const int *sc); |
152 | sql5_export str batstr_2num_bte(bat *res, const bat *v, const int *len); |
153 | sql5_export str bte_dec2second_interval(lng *res, const int *sc, const bte *dec, const int *ek, const int *sk); |
154 | |
155 | sql5_export str nil_2dec_bte(bte *res, const void *val, const int *d, const int *sc); |
156 | sql5_export str nil_2num_bte(bte *res, const void *v, const int *len); |
157 | sql5_export str batnil_2dec_bte(bat *res, const bat *val, const int *d, const int *sc); |
158 | sql5_export str batnil_2num_bte(bat *res, const bat *v, const int *len); |
159 | |
160 | sql5_export str sht_dec_round_wrap(sht *res, const sht *v, const sht *r); |
161 | sql5_export str sht_bat_dec_round_wrap(bat *res, const bat *v, const sht *r); |
162 | sql5_export str sht_round_wrap(sht *res, const sht *v, const int *d, const int *s, const bte *r); |
163 | sql5_export str sht_bat_round_wrap(bat *res, const bat *v, const int *d, const int *s, const bte *r); |
164 | sql5_export str str_2dec_sht(sht *res, const str *val, const int *d, const int *sc); |
165 | sql5_export str str_2num_sht(sht *res, const str *v, const int *len); |
166 | sql5_export str batstr_2dec_sht(bat *res, const bat *val, const int *d, const int *sc); |
167 | sql5_export str batstr_2num_sht(bat *res, const bat *v, const int *len); |
168 | sql5_export str sht_dec2second_interval(lng *res, const int *sc, const sht *dec, const int *ek, const int *sk); |
169 | |
170 | sql5_export str nil_2dec_sht(sht *res, const void *val, const int *d, const int *sc); |
171 | sql5_export str nil_2num_sht(sht *res, const void *v, const int *len); |
172 | sql5_export str batnil_2dec_sht(bat *res, const bat *val, const int *d, const int *sc); |
173 | sql5_export str batnil_2num_sht(bat *res, const bat *v, const int *len); |
174 | |
175 | sql5_export str int_dec_round_wrap(int *res, const int *v, const int *r); |
176 | sql5_export str int_bat_dec_round_wrap(bat *res, const bat *v, const int *r); |
177 | sql5_export str int_round_wrap(int *res, const int *v, const int *d, const int *s, const bte *r); |
178 | sql5_export str int_bat_round_wrap(bat *res, const bat *v, const int *d, const int *s, const bte *r); |
179 | sql5_export str str_2dec_int(int *res, const str *val, const int *d, const int *sc); |
180 | sql5_export str str_2num_int(int *res, const str *v, const int *len); |
181 | sql5_export str batstr_2dec_int(bat *res, const bat *val, const int *d, const int *sc); |
182 | sql5_export str batstr_2num_int(bat *res, const bat *v, const int *len); |
183 | sql5_export str int_dec2second_interval(lng *res, const int *sc, const int *dec, const int *ek, const int *sk); |
184 | |
185 | sql5_export str nil_2dec_int(int *res, const void *val, const int *d, const int *sc); |
186 | sql5_export str nil_2num_int(int *res, const void *v, const int *len); |
187 | sql5_export str batnil_2dec_int(bat *res, const bat *val, const int *d, const int *sc); |
188 | sql5_export str batnil_2num_int(bat *res, const bat *v, const int *len); |
189 | |
190 | sql5_export str lng_dec_round_wrap(lng *res, const lng *v, const lng *r); |
191 | sql5_export str lng_bat_dec_round_wrap(bat *res, const bat *v, const lng *r); |
192 | sql5_export str lng_round_wrap(lng *res, const lng *v, const int *d, const int *s, const bte *r); |
193 | sql5_export str lng_bat_round_wrap(bat *res, const bat *v, const int *d, const int *s, const bte *r); |
194 | sql5_export str str_2dec_lng(lng *res, const str *val, const int *d, const int *sc); |
195 | sql5_export str str_2num_lng(lng *res, const str *v, const int *len); |
196 | sql5_export str batstr_2dec_lng(bat *res, const bat *val, const int *d, const int *sc); |
197 | sql5_export str batstr_2num_lng(bat *res, const bat *v, const int *len); |
198 | sql5_export str lng_dec2second_interval(lng *res, const int *sc, const lng *dec, const int *ek, const int *sk); |
199 | |
200 | sql5_export str nil_2dec_lng(lng *res, const void *val, const int *d, const int *sc); |
201 | sql5_export str nil_2num_lng(lng *res, const void *v, const int *len); |
202 | sql5_export str batnil_2dec_lng(bat *res, const bat *val, const int *d, const int *sc); |
203 | sql5_export str batnil_2num_lng(bat *res, const bat *v, const int *len); |
204 | |
205 | #ifdef HAVE_HGE |
206 | sql5_export str hge_dec_round_wrap(hge *res, const hge *v, const hge *r); |
207 | sql5_export str hge_bat_dec_round_wrap(bat *res, const bat *v, const hge *r); |
208 | sql5_export str hge_round_wrap(hge *res, const hge *v, const int *d, const int *s, const bte *r); |
209 | sql5_export str hge_bat_round_wrap(bat *res, const bat *v, const int *d, const int *s, const bte *r); |
210 | sql5_export str str_2dec_hge(hge *res, const str *val, const int *d, const int *sc); |
211 | sql5_export str str_2num_hge(hge *res, const str *v, const int *len); |
212 | sql5_export str batstr_2dec_hge(bat *res, const bat *val, const int *d, const int *sc); |
213 | sql5_export str batstr_2num_hge(bat *res, const bat *v, const int *len); |
214 | sql5_export str hge_dec2second_interval(lng *res, const int *sc, const hge *dec, const int *ek, const int *sk); |
215 | |
216 | sql5_export str nil_2dec_hge(hge *res, const void *val, const int *d, const int *sc); |
217 | sql5_export str nil_2num_hge(hge *res, const void *v, const int *len); |
218 | sql5_export str batnil_2dec_hge(bat *res, const bat *val, const int *d, const int *sc); |
219 | sql5_export str batnil_2num_hge(bat *res, const bat *v, const int *len); |
220 | #endif |
221 | |
222 | sql5_export str nil_2time_timestamp(timestamp *res, const void *v, const int *len); |
223 | sql5_export str batnil_2time_timestamp(bat *res, const bat *v, const int *len); |
224 | sql5_export str str_2time_timestamp(timestamp *res, const str *v, const int *len); |
225 | sql5_export str str_2time_timestamptz(timestamp *res, const str *v, const int *len, int *tz); |
226 | sql5_export str batstr_2time_timestamp(bat *res, const bat *v, const int *len); |
227 | sql5_export str batstr_2time_timestamptz(bat *res, const bat *v, const int *len, int *tz); |
228 | sql5_export str timestamp_2time_timestamp(timestamp *res, const timestamp *v, const int *len); |
229 | sql5_export str battimestamp_2time_timestamp(bat *res, const bat *v, const int *len); |
230 | |
231 | sql5_export str nil_2time_daytime(daytime *res, const void *v, const int *len); |
232 | sql5_export str batnil_2time_daytime(bat *res, const bat *v, const int *len); |
233 | sql5_export str str_2time_daytime(daytime *res, const str *v, const int *len); |
234 | sql5_export str str_2time_daytimetz(daytime *res, const str *v, const int *len, int *tz); |
235 | sql5_export str batstr_2time_daytime(bat *res, const bat *v, const int *len); |
236 | sql5_export str batstr_2time_daytimetz(bat *res, const bat *v, const int *len, int *tz); |
237 | sql5_export str daytime_2time_daytime(daytime *res, const daytime *v, const int *len); |
238 | sql5_export str batdaytime_2time_daytime(bat *res, const bat *v, const int *len); |
239 | |
240 | sql5_export str nil_2_timestamp(timestamp *res, const void *val); |
241 | sql5_export str batnil_2_timestamp(bat *res, const bat *val); |
242 | sql5_export str str_2_timestamp(timestamp *res, const str *val); |
243 | sql5_export str batstr_2_timestamp(bat *res, const bat *val); |
244 | |
245 | sql5_export str bat_date_trunc(bat *res, const str *scale, const bat *v); |
246 | sql5_export str date_trunc(timestamp *res, const str *scale, const timestamp *v); |
247 | |
248 | sql5_export str nil_2_daytime(daytime *res, const void *val); |
249 | sql5_export str batnil_2_daytime(bat *res, const bat *val); |
250 | sql5_export str str_2_daytime(daytime *res, const str *val); |
251 | sql5_export str batstr_2_daytime(bat *res, const bat *val); |
252 | |
253 | sql5_export str nil_2_date(date *res, const void *val); |
254 | sql5_export str batnil_2_date(bat *res, const bat *val); |
255 | sql5_export str str_2_date(date *res, const str *val); |
256 | sql5_export str batstr_2_date(bat *res, const bat *val); |
257 | sql5_export str SQLdate_2_str(str *res, const date *val); |
258 | |
259 | sql5_export str str_2_blob(blob * *res, const str *val); |
260 | sql5_export str batstr_2_blob(bat *res, const bat *val); |
261 | sql5_export str SQLblob_2_str(str *res, const blob * val); |
262 | |
263 | |
264 | sql5_export str SQLstr_cast(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
265 | sql5_export str SQLbatstr_cast(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
266 | |
267 | sql5_export str flt_dec_round_wrap(flt *res, const flt *v, const flt *r); |
268 | sql5_export str flt_bat_dec_round_wrap(bat *res, const bat *v, const flt *r); |
269 | sql5_export str flt_round_wrap(flt *res, const flt *v, const bte *r); |
270 | sql5_export str flt_bat_round_wrap(bat *res, const bat *v, const bte *r); |
271 | sql5_export str flt_trunc_wrap(flt *res, const flt *v, const int *r); |
272 | |
273 | sql5_export str dbl_dec_round_wrap(dbl *res, const dbl *v, const dbl *r); |
274 | sql5_export str dbl_bat_dec_round_wrap(bat *res, const bat *v, const dbl *r); |
275 | sql5_export str dbl_round_wrap(dbl *res, const dbl *v, const bte *r); |
276 | sql5_export str dbl_bat_round_wrap(bat *res, const bat *v, const bte *r); |
277 | sql5_export str dbl_trunc_wrap(dbl *res, const dbl *v, const int *r); |
278 | |
279 | #define radians(x) ((x) * 3.14159265358979323846 /180.0 ) |
280 | #define degrees(x) ((x) * 180.0/3.14159265358979323846 ) |
281 | |
282 | sql5_export str SQLcst_alpha_cst(dbl *res, const dbl *decl, const dbl *theta); |
283 | sql5_export str SQLbat_alpha_cst(bat *res, const bat *decl, const dbl *theta); |
284 | sql5_export str SQLcst_alpha_bat(bat *res, const dbl *decl, const bat *theta); |
285 | sql5_export str month_interval(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
286 | sql5_export str second_interval(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
287 | sql5_export str second_interval_daytime(lng *res, const daytime *s, const int *ek, const int *sk); |
288 | |
289 | #include "sql_cast.h" |
290 | |
291 | sql5_export str checkSQLContext(Client cntxt); |
292 | sql5_export str getSQLContext(Client cntxt, MalBlkPtr mb, mvc **c, backend **b); |
293 | |
294 | sql5_export void freeVariables(Client c, MalBlkPtr mb, MalStkPtr glb, int start); |
295 | sql5_export str second_interval_2_daytime(daytime *res, const lng *s, const int *d); |
296 | sql5_export str timestamp_2_daytime(daytime *res, const timestamp *v, const int *d); |
297 | sql5_export str date_2_timestamp(timestamp *res, const date *v, const int *d); |
298 | sql5_export str SQLcurrent_daytime(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
299 | sql5_export str SQLcurrent_timestamp(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); |
300 | |
301 | sql5_export str STRindex_int(int *res, const str *src, const bit *u); |
302 | sql5_export str BATSTRindex_int(bat *res, const bat *src, const bit *u); |
303 | sql5_export str STRindex_sht(sht *res, const str *src, const bit *u); |
304 | sql5_export str BATSTRindex_sht(bat *res, const bat *src, const bit *u); |
305 | sql5_export str STRindex_bte(bte *res, const str *src, const bit *u); |
306 | sql5_export str BATSTRindex_bte(bat *res, const bat *src, const bit *u); |
307 | sql5_export str STRstrings(str *res, const str *src); |
308 | sql5_export str BATSTRstrings(bat *res, const bat *src); |
309 | |
310 | sql5_export str SQLflush_log(void *ret); |
311 | sql5_export str SQLsuspend_log_flushing(void *ret); |
312 | sql5_export str SQLresume_log_flushing(void *ret); |
313 | sql5_export str SQLhot_snapshot(void *ret, const str *tarfile); |
314 | |
315 | #endif /* _SQL_H */ |
316 | |