Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UDSF
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
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-UDSF
Commits
ae02e1ac
Commit
ae02e1ac
authored
Jun 01, 2021
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chagne 253 245
parent
25b8a4bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
build/UDSF/build/CMakeFiles/udsf.dir/home/ue/openxg-udsf/src/impl/RecordCRUDApiImpl.cpp.o
....dir/home/ue/openxg-udsf/src/impl/RecordCRUDApiImpl.cpp.o
+0
-0
build/UDSF/build/udsf
build/UDSF/build/udsf
+0
-0
src/impl/RecordCRUDApiImpl.cpp
src/impl/RecordCRUDApiImpl.cpp
+26
-2
No files found.
build/UDSF/build/CMakeFiles/udsf.dir/home/ue/openxg-udsf/src/impl/RecordCRUDApiImpl.cpp.o
View file @
ae02e1ac
No preview for this file type
build/UDSF/build/udsf
View file @
ae02e1ac
No preview for this file type
src/impl/RecordCRUDApiImpl.cpp
View file @
ae02e1ac
...
...
@@ -201,6 +201,8 @@ void RecordCRUDApiImpl::get_record(const std::string &realmId, const std::string
char
*
filed
=
row
[
i
];
unsigned
int
field_length
=
lengths
[
i
];
field
=
mysql_fetch_field
(
result
);
// mysql_fetch_fields(result);
//json[field->name] = filed;
printf
(
"column[%d],length[%d],field[%s]:data[%s]
\n
"
,
i
,
field_length
,
field
->
name
,
filed
?
filed
:
"null"
);
...
...
@@ -214,8 +216,30 @@ void RecordCRUDApiImpl::get_record(const std::string &realmId, const std::string
}
else
{
json
[
"Content-ID"
]
=
field
->
name
;
json
[
"Content-Type"
]
=
"varchar(32)"
;
json
[
"content"
]
=
filed
;
printf
(
"field->type---%d
\n
"
,(
int
)
field
->
type
);
switch
(
field
->
type
)
{
case
253
:
{
printf
(
"253
\n
"
);
json
[
"Content-Type"
]
=
"varchar"
;
break
;
}
case
245
:
{
printf
(
"245
\n
"
);
json
[
"Content-Type"
]
=
"JSON"
;
break
;
}
}
if
(
json
[
"Content-Type"
]
==
"JSON"
)
{
json
[
"content"
]
=
nlohmann
::
json
::
parse
(
filed
)
;
}
else
{
json
[
"content"
]
=
filed
;
}
//Blocks_objects = Blocks_objects + json.dump() ;
objects
[
"blocks"
].
push_back
(
json
);
//if(i != num_fields-1){ Blocks_objects = Blocks_objects + ",";}
...
...
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