1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Make user variable prefix recognized by IsArgJson and IsJson

modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/jsonudf.cpp

- Stringify option is now a ; separated list of columns
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/mongo.h
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabcmg.cpp
  modified:   storage/connect/tabcmg.h
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabjmg.h
  modified:   storage/connect/tabjson.cpp

- PrepareColist not a static function anymore (+ typo)
  modified:   storage/connect/taboccur.cpp

- JDVC: Recognize schema (database) from a wrapper server
  modified:   storage/connect/tabjdbc.cpp
This commit is contained in:
Olivier Bertrand
2021-07-24 16:28:57 +02:00
parent 1c4b917f0e
commit 0f18135ec8
13 changed files with 111 additions and 61 deletions

View File

@@ -1,7 +1,7 @@
/*************** json CPP Declares Source Code File (.H) ***************/
/* Name: json.cpp Version 1.5 */
/* Name: json.cpp Version 1.6 */
/* */
/* (C) Copyright to the author Olivier BERTRAND 2014 - 2020 */
/* (C) Copyright to the author Olivier BERTRAND 2014 - 2021 */
/* */
/* This file contains the JSON classes functions. */
/***********************************************************************/
@@ -55,6 +55,7 @@ char *GetExceptionDesc(PGLOBAL g, unsigned int e);
char *GetJsonNull(void);
int GetDefaultPrec(void);
int PrepareColist(char*);
/***********************************************************************/
/* IsNum: check whether this string is all digits. */
@@ -111,6 +112,27 @@ char* NextChr(PSZ s, char sep)
return p2;
} // end of NextChr
/***********************************************************************/
/* Stringified: check that this column is in the stringified list. */
/***********************************************************************/
bool Stringified(PCSZ strfy, char *colname)
{
if (strfy) {
char *p, colist[512];
int n;
strncpy(colist, strfy, sizeof(colist) - 1);
n = PrepareColist(colist);
for (p = colist; n && p; p += (strlen(p) + 1), n--)
if (!stricmp(p, colname))
return true;
} // endif strfy
return false;
} // end of Stringified
#if 0
/***********************************************************************/
/* Allocate a VAL structure, make sure common field and Nd are zeroed. */