mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Add new JPATH features
modified: storage/connect/bson.cpp modified: storage/connect/bsonudf.cpp modified: storage/connect/bsonudf.h modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/tabbson.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h
This commit is contained in:
@@ -114,7 +114,7 @@ BJNX::BJNX(PGLOBAL g) : BDOC(g)
|
||||
Jp = NULL;
|
||||
Nodes = NULL;
|
||||
Value = NULL;
|
||||
MulVal = NULL;
|
||||
//MulVal = NULL;
|
||||
Jpath = NULL;
|
||||
Buf_Type = TYPE_STRING;
|
||||
Long = len;
|
||||
@@ -145,7 +145,7 @@ BJNX::BJNX(PGLOBAL g, PBVAL row, int type, int len, int prec, my_bool wr) : BDOC
|
||||
Jp = NULL;
|
||||
Nodes = NULL;
|
||||
Value = AllocateValue(g, type, len, prec);
|
||||
MulVal = NULL;
|
||||
//MulVal = NULL;
|
||||
Jpath = NULL;
|
||||
Buf_Type = type;
|
||||
Long = len;
|
||||
@@ -270,40 +270,6 @@ my_bool BJNX::SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm)
|
||||
return true;
|
||||
} // endif's
|
||||
|
||||
#if 0
|
||||
// For calculated arrays, a local Value must be used
|
||||
switch (jnp->Op) {
|
||||
case OP_NUM:
|
||||
jnp->Valp = AllocateValue(g, TYPE_INT);
|
||||
break;
|
||||
case OP_ADD:
|
||||
case OP_MULT:
|
||||
case OP_SEP:
|
||||
if (!IsTypeChar(Buf_Type))
|
||||
jnp->Valp = AllocateValue(g, Buf_Type, 0, GetPrecision());
|
||||
else
|
||||
jnp->Valp = AllocateValue(g, TYPE_DOUBLE, 0, 2);
|
||||
|
||||
break;
|
||||
case OP_MIN:
|
||||
case OP_MAX:
|
||||
jnp->Valp = AllocateValue(g, Buf_Type, Long, GetPrecision());
|
||||
break;
|
||||
case OP_CNC:
|
||||
if (IsTypeChar(Buf_Type))
|
||||
jnp->Valp = AllocateValue(g, TYPE_STRING, Long, GetPrecision());
|
||||
else
|
||||
jnp->Valp = AllocateValue(g, TYPE_STRING, 512);
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} // endswitch Op
|
||||
|
||||
if (jnp->Valp)
|
||||
MulVal = AllocateValue(g, jnp->Valp);
|
||||
#endif // 0
|
||||
|
||||
return false;
|
||||
} // end of SetArrayOptions
|
||||
|
||||
@@ -449,6 +415,8 @@ PBVAL BJNX::MakeJson(PGLOBAL g, PBVAL bvp, int n)
|
||||
{
|
||||
PBVAL vlp, jvp = bvp;
|
||||
|
||||
Jb = false;
|
||||
|
||||
if (n < Nod -1) {
|
||||
if (bvp->Type == TYPE_JAR) {
|
||||
int ars = GetArraySize(bvp);
|
||||
|
Reference in New Issue
Block a user