Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
2.1
-
None
-
None
Description
Provide import and export functions for popular data formats like JSON, XML (limited), PHP, ...
for Connector/C and MariaDB Server (which use same code base for dynamic columns)
Tasks:
Dynamic column library (includes MariaDB Server and Connector/C).
1) Add support for arrays with ordinal indexes (currently dynamic columns are limited to use string indexes only)
2) Provide a library for importing/exporting data to and from Dynamic columns.
The following data formats should be supported:
- JSON
- XML (limited to unique keys only)
- PHP,
- ...
MariaDB Server:
3) Provide user defined function (UDF) based on library (task 2) for importing and exporting data
MariaDB Connector/C:
3) Provide a plugin interface based on library (task 2) for importing and exporting data
Examples of usage:
1) MariaDB Server
SET @a:='{"menu": {
|
"id": "file",
|
"value": "File",
|
"popup": {
|
"menuitem": [
|
{"value": "New", "onclick": "CreateNewDoc()"},
|
{"value": "Open", "onclick": "OpenDoc()"},
|
{"value": "Close", "onclick": "CloseDoc()"}
|
]
|
}
|
}}';
|
INSERT INTO my_table (dyncol) VALUES (COLUMN_IMPORT("JSON", @a))
|
2) Connector/C
char *json_str='{'menu': {
|
'id': 'file',
|
'value': 'File',
|
'popup': {
|
'menuitem': [
|
{'value': 'New', 'onclick': 'CreateNewDoc()'},
|
{'value': 'Open', 'onclick': 'OpenDoc()'},
|
{'value': 'Close', 'onclick': 'CloseDoc()'}
|
]
|
}
|
}}";
|
rc= mariadb_dyncol_import(dyncol, "json", json_str);
|
Programming language: C