Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6cd3588f
Commit
6cd3588f
authored
Jul 22, 2021
by
Michael Okoko
Committed by
Vicențiu-Marian Ciorbaru
Jul 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve documentation of json parser functions
Signed-off-by:
Michael Okoko
<
okokomichaels@outlook.com
>
parent
aafb8886
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
include/mysql/service_json.h
include/mysql/service_json.h
+11
-9
No files found.
include/mysql/service_json.h
View file @
6cd3588f
...
@@ -20,23 +20,25 @@
...
@@ -20,23 +20,25 @@
@file
@file
json service
json service
E
s
ports JSON parsing methods for plugins to use.
E
x
ports JSON parsing methods for plugins to use.
Fuctions of the service:
Fu
n
ctions of the service:
js_type - returns the type of the JSON argument,
js
on
_type - returns the type of the JSON argument,
and the parsed value if it's scalar (not object or array)
and the parsed value if it's scalar (not object or array)
js
_get_array_item - expec
s JSON array as an argument,
js
on_get_array_item - expect
s JSON array as an argument,
and returns the
n_item's item's type and value
and returns the
type of the element at index `n_item`.
Returns JSV_NOTHING type if the array is shorter
Returns JSV_NOTHING type if the array is shorter
than n_item and the actual length of the array in v_len.
than n_item and the actual length of the array in value_len.
If successful, then `value` up till `value[value_len]` contains the array
element at the desired index (n_item).
js_get_object_key - expects JSON object as an argument,
js
on
_get_object_key - expects JSON object as an argument,
searches for a key in the object, return it's type and
value
.
searches for a key in the object, return it's type and
stores its value in `value`
.
JSV_NOTHING if no such key found, the number of keys
JSV_NOTHING if no such key found, the number of keys
in v_len.
in v_len.
js_get_object_nkey - expects JSON object as an argument.
js
on
_get_object_nkey - expects JSON object as an argument.
finds n_key's key in the object, returns it's name, type and value.
finds n_key's key in the object, returns it's name, type and value.
JSV_NOTHING if object has less keys than n_key.
JSV_NOTHING if object has less keys than n_key.
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment