mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Fix bug returning pointer to a stack string
in JVALUE::GetString modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp - Fix a compiler bug happening on some configuration and platforms in JSNX::CalculateArray modified: storage/connect/jsonudf.cpp - Set default Schema as current directory This fix several bugs like: Fail to make JSON catalog tables Fail to use zipped file made by a file LOAD modified: storage/connect/reldef.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h
This commit is contained in:
@@ -1403,10 +1403,20 @@ double JVALUE::GetFloat(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Return the Value's String value. */
|
/* Return the Value's String value. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PSZ JVALUE::GetString(void)
|
PSZ JVALUE::GetString(PGLOBAL g)
|
||||||
{
|
{
|
||||||
char buf[32];
|
char *p;
|
||||||
return (Value) ? Value->GetCharString(buf) : NULL;
|
|
||||||
|
if (Value) {
|
||||||
|
char buf[32];
|
||||||
|
|
||||||
|
if ((p = Value->GetCharString(buf)) == buf)
|
||||||
|
p = PlugDup(g, buf);
|
||||||
|
|
||||||
|
} else
|
||||||
|
p = NULL;
|
||||||
|
|
||||||
|
return p;
|
||||||
} // end of GetString
|
} // end of GetString
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
@@ -165,7 +165,7 @@ class JSON : public BLOCK {
|
|||||||
virtual PJPR GetFirst(void) {X return NULL;}
|
virtual PJPR GetFirst(void) {X return NULL;}
|
||||||
virtual int GetInteger(void) {X return 0;}
|
virtual int GetInteger(void) {X return 0;}
|
||||||
virtual double GetFloat() {X return 0.0;}
|
virtual double GetFloat() {X return 0.0;}
|
||||||
virtual PSZ GetString() {X return NULL;}
|
virtual PSZ GetString(PGLOBAL g) {X return NULL;}
|
||||||
virtual PSZ GetText(PGLOBAL g, PSZ text) {X return NULL;}
|
virtual PSZ GetText(PGLOBAL g, PSZ text) {X return NULL;}
|
||||||
virtual bool Merge(PGLOBAL g, PJSON jsp) { X return true; }
|
virtual bool Merge(PGLOBAL g, PJSON jsp) { X return true; }
|
||||||
virtual bool SetValue(PGLOBAL g, PJVAL jvp, int i) { X return true; }
|
virtual bool SetValue(PGLOBAL g, PJVAL jvp, int i) { X return true; }
|
||||||
@@ -275,7 +275,7 @@ class JVALUE : public JSON {
|
|||||||
virtual int GetInteger(void);
|
virtual int GetInteger(void);
|
||||||
virtual long long GetBigint(void);
|
virtual long long GetBigint(void);
|
||||||
virtual double GetFloat(void);
|
virtual double GetFloat(void);
|
||||||
virtual PSZ GetString(void);
|
virtual PSZ GetString(PGLOBAL g);
|
||||||
virtual PSZ GetText(PGLOBAL g, PSZ text);
|
virtual PSZ GetText(PGLOBAL g, PSZ text);
|
||||||
virtual void SetValue(PJSON jsp);
|
virtual void SetValue(PJSON jsp);
|
||||||
virtual void SetValue(PVAL valp) { Value = valp; Jsp = NULL; }
|
virtual void SetValue(PVAL valp) { Value = valp; Jsp = NULL; }
|
||||||
|
@@ -143,7 +143,7 @@ my_bool JSNX::SetArrayOptions(PGLOBAL g, char *p, int i, PSZ nm)
|
|||||||
jnp->Rank = B;
|
jnp->Rank = B;
|
||||||
jnp->Op = OP_LE;
|
jnp->Op = OP_LE;
|
||||||
} else if (!Value->IsTypeNum()) {
|
} else if (!Value->IsTypeNum()) {
|
||||||
jnp->CncVal = AllocateValue(g, (void*)", ", TYPE_STRING);
|
jnp->CncVal = AllocateValue(g, PlugDup(g, ", "), TYPE_STRING);
|
||||||
jnp->Op = OP_CNC;
|
jnp->Op = OP_CNC;
|
||||||
} else
|
} else
|
||||||
jnp->Op = OP_ADD;
|
jnp->Op = OP_ADD;
|
||||||
@@ -181,6 +181,10 @@ my_bool JSNX::SetArrayOptions(PGLOBAL g, char *p, int i, PSZ nm)
|
|||||||
if (n > 2) {
|
if (n > 2) {
|
||||||
// Set concat intermediate string
|
// Set concat intermediate string
|
||||||
p[n - 1] = 0;
|
p[n - 1] = 0;
|
||||||
|
|
||||||
|
if (trace)
|
||||||
|
htrc("Concat string=%s\n", p + 1);
|
||||||
|
|
||||||
jnp->CncVal = AllocateValue(g, p + 1, TYPE_STRING);
|
jnp->CncVal = AllocateValue(g, p + 1, TYPE_STRING);
|
||||||
} // endif n
|
} // endif n
|
||||||
|
|
||||||
@@ -242,6 +246,9 @@ my_bool JSNX::ParseJpath(PGLOBAL g)
|
|||||||
// Jpath = Name;
|
// Jpath = Name;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (trace)
|
||||||
|
htrc("ParseJpath %s\n", SVP(Jpath));
|
||||||
|
|
||||||
if (!(pbuf = PlgDBDup(g, Jpath)))
|
if (!(pbuf = PlgDBDup(g, Jpath)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -301,6 +308,12 @@ my_bool JSNX::ParseJpath(PGLOBAL g)
|
|||||||
|
|
||||||
Nod = i;
|
Nod = i;
|
||||||
MulVal = AllocateValue(g, Value);
|
MulVal = AllocateValue(g, Value);
|
||||||
|
|
||||||
|
if (trace)
|
||||||
|
for (i = 0; i < Nod; i++)
|
||||||
|
htrc("Node(%d) Key=%s Op=%d Rank=%d\n",
|
||||||
|
i, SVP(Nodes[i].Key), Nodes[i].Op, Nodes[i].Rank);
|
||||||
|
|
||||||
Parsed = true;
|
Parsed = true;
|
||||||
return false;
|
return false;
|
||||||
} // end of ParseJpath
|
} // end of ParseJpath
|
||||||
@@ -485,7 +498,7 @@ PVAL JSNX::ExpandArray(PGLOBAL g, PJAR arp, int n)
|
|||||||
PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n)
|
PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n)
|
||||||
{
|
{
|
||||||
//int i, ars, nv = 0, nextsame = Tjp->NextSame;
|
//int i, ars, nv = 0, nextsame = Tjp->NextSame;
|
||||||
int i, ars, nv = 0, nextsame = 0;
|
int i, nv = 0, nextsame = 0;
|
||||||
my_bool err;
|
my_bool err;
|
||||||
OPVAL op = Nodes[n].Op;
|
OPVAL op = Nodes[n].Op;
|
||||||
PVAL val[2], vp = Nodes[n].Valp;
|
PVAL val[2], vp = Nodes[n].Valp;
|
||||||
@@ -493,11 +506,20 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n)
|
|||||||
JVALUE jval;
|
JVALUE jval;
|
||||||
|
|
||||||
vp->Reset();
|
vp->Reset();
|
||||||
ars = arp->size();
|
//ars = arp->size();
|
||||||
|
|
||||||
for (i = 0; i < ars; i++) {
|
if (trace)
|
||||||
|
htrc("CalculateArray size=%d\n", arp->size());
|
||||||
|
// htrc("CalculateArray size=%d\n", ars);
|
||||||
|
|
||||||
|
for (i = 0; i < arp->size(); i++) {
|
||||||
|
//for (i = 0; i < ars; i++) { because compiler bug
|
||||||
jvrp = arp->GetValue(i);
|
jvrp = arp->GetValue(i);
|
||||||
|
|
||||||
|
if (trace)
|
||||||
|
htrc("Value %s null=%d nv=%d\n",
|
||||||
|
jvrp->GetString(g), jvrp->IsNull() ? 1 : 0, nv);
|
||||||
|
|
||||||
if (!jvrp->IsNull() || (op == OP_CNC && GetJsonNull())) {
|
if (!jvrp->IsNull() || (op == OP_CNC && GetJsonNull())) {
|
||||||
if (jvrp->IsNull()) {
|
if (jvrp->IsNull()) {
|
||||||
jvrp->Value = AllocateValue(g, GetJsonNull(), TYPE_STRING);
|
jvrp->Value = AllocateValue(g, GetJsonNull(), TYPE_STRING);
|
||||||
@@ -514,8 +536,8 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n)
|
|||||||
} else
|
} else
|
||||||
SetJsonValue(g, MulVal, jvp, n);
|
SetJsonValue(g, MulVal, jvp, n);
|
||||||
|
|
||||||
if (!MulVal->IsZero()) {
|
if (!MulVal->IsNull()) {
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case OP_CNC:
|
case OP_CNC:
|
||||||
if (Nodes[n].CncVal) {
|
if (Nodes[n].CncVal) {
|
||||||
val[0] = Nodes[n].CncVal;
|
val[0] = Nodes[n].CncVal;
|
||||||
@@ -1876,7 +1898,7 @@ char *json_array_add_values(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
PJAR arp;
|
PJAR arp;
|
||||||
PJVAL jvp = MakeValue(g, args, 0, &top);
|
PJVAL jvp = MakeValue(g, args, 0, &top);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(top = ParseJson(g, p, strlen(p)))) {
|
if (!(top = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -2666,7 +2688,7 @@ char *json_object_list(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
PJSON jsp;
|
PJSON jsp;
|
||||||
PJVAL jvp = MakeValue(g, args, 0);
|
PJVAL jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3050,7 +3072,7 @@ char *json_get_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3165,7 +3187,7 @@ char *jsonget_string(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
goto err;
|
goto err;
|
||||||
@@ -3280,7 +3302,7 @@ long long jsonget_int(UDF_INIT *initid, UDF_ARGS *args,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
if (g->Mrr) *error = 1;
|
if (g->Mrr) *error = 1;
|
||||||
@@ -3395,7 +3417,7 @@ double jsonget_real(UDF_INIT *initid, UDF_ARGS *args,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
*is_null = 1;
|
*is_null = 1;
|
||||||
@@ -3511,7 +3533,7 @@ char *jsonlocate(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
goto err;
|
goto err;
|
||||||
@@ -3635,7 +3657,7 @@ char *json_locate_all(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
goto err;
|
goto err;
|
||||||
@@ -3807,7 +3829,7 @@ long long jsoncontains_path(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
goto err;
|
goto err;
|
||||||
@@ -3894,7 +3916,7 @@ char *handle_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
throw 2;
|
throw 2;
|
||||||
} // endif jsp
|
} // endif jsp
|
||||||
@@ -4230,14 +4252,14 @@ char *jfile_make(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!strchr("[{ \t\r\n", *p)) {
|
if (!strchr("[{ \t\r\n", *p)) {
|
||||||
// Is this a file name?
|
// Is this a file name?
|
||||||
if (!(p = GetJsonFile(g, p))) {
|
if (!(p = GetJsonFile(g, p))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
goto fin;
|
goto fin;
|
||||||
} else
|
} else
|
||||||
fn = jvp->GetString();
|
fn = jvp->GetString(g);
|
||||||
|
|
||||||
} // endif p
|
} // endif p
|
||||||
|
|
||||||
@@ -4380,7 +4402,7 @@ char *jbin_array_add_values(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
PJVAL jvp = MakeValue(g, args, 0, &top);
|
PJVAL jvp = MakeValue(g, args, 0, &top);
|
||||||
PGLOBAL gb = GetMemPtr(g, args, 0);
|
PGLOBAL gb = GetMemPtr(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(top = ParseJson(g, p, strlen(p)))) {
|
if (!(top = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -4918,7 +4940,7 @@ char *jbin_object_list(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
PJSON jsp;
|
PJSON jsp;
|
||||||
PJVAL jvp = MakeValue(g, args, 0);
|
PJVAL jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -4989,7 +5011,7 @@ char *jbin_get_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
goto fin;
|
goto fin;
|
||||||
@@ -5163,7 +5185,7 @@ char *bin_handle_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
} else
|
} else
|
||||||
jvp = MakeValue(g, args, 0);
|
jvp = MakeValue(g, args, 0);
|
||||||
|
|
||||||
if ((p = jvp->GetString())) {
|
if ((p = jvp->GetString(g))) {
|
||||||
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
if (!(jsp = ParseJson(g, p, strlen(p)))) {
|
||||||
PUSH_WARNING(g->Message);
|
PUSH_WARNING(g->Message);
|
||||||
goto fin;
|
goto fin;
|
||||||
|
@@ -227,10 +227,10 @@ bool TABDEF::Define(PGLOBAL g, PCATLG cat,
|
|||||||
{
|
{
|
||||||
int poff = 0;
|
int poff = 0;
|
||||||
|
|
||||||
Name = (PSZ)name;
|
Hc = ((MYCAT*)cat)->GetHandler();
|
||||||
Schema = (PSZ)schema;
|
Name = (PSZ)name;
|
||||||
|
Schema = (PSZ)Hc->GetDBName(schema);
|
||||||
Cat = cat;
|
Cat = cat;
|
||||||
Hc = ((MYCAT*)cat)->GetHandler();
|
|
||||||
Catfunc = GetFuncID(GetStringCatInfo(g, "Catfunc", NULL));
|
Catfunc = GetFuncID(GetStringCatInfo(g, "Catfunc", NULL));
|
||||||
Elemt = GetIntCatInfo("Elements", 0);
|
Elemt = GetIntCatInfo("Elements", 0);
|
||||||
Multiple = GetIntCatInfo("Multiple", 0);
|
Multiple = GetIntCatInfo("Multiple", 0);
|
||||||
|
@@ -500,7 +500,7 @@ JSONDEF::JSONDEF(void)
|
|||||||
Sep = '.';
|
Sep = '.';
|
||||||
#if defined(MONGO_SUPPORT)
|
#if defined(MONGO_SUPPORT)
|
||||||
Uri = NULL;
|
Uri = NULL;
|
||||||
Collname = Schema = Options = Filter = NULL;
|
Collname = Options = Filter = NULL;
|
||||||
Pipe = false;
|
Pipe = false;
|
||||||
Driver = NULL;
|
Driver = NULL;
|
||||||
Version = 0;
|
Version = 0;
|
||||||
@@ -515,7 +515,8 @@ JSONDEF::JSONDEF(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff)
|
bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff)
|
||||||
{
|
{
|
||||||
Jmode = (JMODE)GetIntCatInfo("Jmode", MODE_OBJECT);
|
Schema = GetStringCatInfo(g, "DBname", Schema);
|
||||||
|
Jmode = (JMODE)GetIntCatInfo("Jmode", MODE_OBJECT);
|
||||||
Objname = GetStringCatInfo(g, "Object", NULL);
|
Objname = GetStringCatInfo(g, "Object", NULL);
|
||||||
Xcol = GetStringCatInfo(g, "Expand", NULL);
|
Xcol = GetStringCatInfo(g, "Expand", NULL);
|
||||||
Pretty = GetIntCatInfo("Pretty", 2);
|
Pretty = GetIntCatInfo("Pretty", 2);
|
||||||
@@ -528,7 +529,6 @@ bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff)
|
|||||||
Collname = GetStringCatInfo(g, "Name",
|
Collname = GetStringCatInfo(g, "Name",
|
||||||
(Catfunc & (FNC_TABLE | FNC_COL)) ? NULL : Name);
|
(Catfunc & (FNC_TABLE | FNC_COL)) ? NULL : Name);
|
||||||
Collname = GetStringCatInfo(g, "Tabname", Collname);
|
Collname = GetStringCatInfo(g, "Tabname", Collname);
|
||||||
Schema = GetStringCatInfo(g, "Dbname", "test");
|
|
||||||
Options = GetStringCatInfo(g, "Colist", NULL);
|
Options = GetStringCatInfo(g, "Colist", NULL);
|
||||||
Filter = GetStringCatInfo(g, "Filter", NULL);
|
Filter = GetStringCatInfo(g, "Filter", NULL);
|
||||||
Pipe = GetBoolCatInfo("Pipeline", false);
|
Pipe = GetBoolCatInfo("Pipeline", false);
|
||||||
@@ -2278,11 +2278,7 @@ void TDBJSON::CloseDB(PGLOBAL g)
|
|||||||
TDBJCL::TDBJCL(PJDEF tdp) : TDBCAT(tdp)
|
TDBJCL::TDBJCL(PJDEF tdp) : TDBCAT(tdp)
|
||||||
{
|
{
|
||||||
Topt = tdp->GetTopt();
|
Topt = tdp->GetTopt();
|
||||||
#if defined(MONGO_SUPPORT)
|
|
||||||
Db = tdp->Schema;
|
Db = tdp->Schema;
|
||||||
#else
|
|
||||||
Db = NULL;
|
|
||||||
#endif
|
|
||||||
Dsn = tdp->Uri;
|
Dsn = tdp->Uri;
|
||||||
} // end of TDBJCL constructor
|
} // end of TDBJCL constructor
|
||||||
|
|
||||||
|
@@ -70,7 +70,6 @@ public:
|
|||||||
const char *Uri; /* MongoDB connection URI */
|
const char *Uri; /* MongoDB connection URI */
|
||||||
#if defined(MONGO_SUPPORT)
|
#if defined(MONGO_SUPPORT)
|
||||||
PCSZ Collname; /* External collection name */
|
PCSZ Collname; /* External collection name */
|
||||||
PCSZ Schema; /* External schema (DB) name */
|
|
||||||
PSZ Options; /* Colist ; Pipe */
|
PSZ Options; /* Colist ; Pipe */
|
||||||
PSZ Filter; /* Filter */
|
PSZ Filter; /* Filter */
|
||||||
PSZ Driver; /* MongoDB Driver (C or JAVA) */
|
PSZ Driver; /* MongoDB Driver (C or JAVA) */
|
||||||
|
Reference in New Issue
Block a user