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

- Adding json udf's. Making the second version of json tables.

added:
  storage/connect/jsonudf.cpp
modified:
  storage/connect/CMakeLists.txt
  storage/connect/json.cpp
  storage/connect/json.h
  storage/connect/tabjson.cpp
  storage/connect/tabjson.h

- Fix utf8 issues with PROXY tables
modified:
  storage/connect/ha_connect.cc
  storage/connect/tabutil.cpp
  storage/connect/tabutil.h
This commit is contained in:
Olivier Bertrand
2015-02-11 21:39:41 +01:00
parent 3c097fd689
commit dcfe068d59
83 changed files with 553 additions and 4828 deletions

View File

@@ -505,8 +505,11 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, FILE *fs, int pretty)
err = (b && jp->WriteChr('\t'));
err |= SerializeObject(jp, (PJOB)jsp);
break;
case TYPE_JVAL:
err = SerializeValue(jp, (PJVAL)jsp);
break;
default:
strcpy(g->Message, "json tree is not an Array or an Object");
strcpy(g->Message, "Invalid json tree");
} // endswitch Type
if (fs) {
@@ -1056,3 +1059,27 @@ PSZ JVALUE::GetString(void)
return (Value) ? Value->GetCharString(buf) : NULL;
} // end of GetString
/***********************************************************************/
/* Set the Value's value as the given integer. */
/***********************************************************************/
void JVALUE::SetInteger(PGLOBAL g, int n)
{
Value = AllocateValue(g, &n, TYPE_INT);
} // end of AddInteger
/***********************************************************************/
/* Set the Value's value as the given DOUBLE. */
/***********************************************************************/
void JVALUE::SetFloat(PGLOBAL g, double f)
{
Value = AllocateValue(g, &f, TYPE_DOUBLE, 6);
} // end of AddFloat
/***********************************************************************/
/* Set the Value's value as the given string. */
/***********************************************************************/
void JVALUE::SetString(PGLOBAL g, PSZ s)
{
Value = AllocateValue(g, s, TYPE_STRING);
} // end of AddFloat