Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
Practical-Cryptdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhaozhen
Practical-Cryptdb
Commits
6920414c
Commit
6920414c
authored
Oct 23, 2017
by
Casualet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update load_and_store
parent
e17e4d03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
load_and_store.cc
main/load_and_store.cc
+8
-4
No files found.
main/load_and_store.cc
View file @
6920414c
...
...
@@ -809,11 +809,11 @@ static void add(rawReturnValue & str,ResType & item ){
}
str
.
rowValues
.
push_back
(
temp
);
}
str
.
fieldTypes
=
item
.
types
;
}
static
void
construct_insert
(
rawReturnValue
&
str
,
std
::
string
table
,
std
::
vector
<
string
>
&
res
){
static
void
construct_insert
(
rawReturnValue
&
str
,
std
::
string
table
,
std
::
vector
<
string
>
&
res
){
std
::
string
head
=
string
(
"INSERT INTO `"
)
+
table
+
"` VALUES "
;
int
num_of_pipe
=
3
;
int
cnt
=
0
;
...
...
@@ -822,7 +822,12 @@ static void construct_insert(rawReturnValue & str,std::string table,std::vector<
++
cnt
;
cur
+=
"("
;
for
(
unsigned
int
j
=
0u
;
j
<
str
.
rowValues
[
i
].
size
();
j
++
){
cur
+=
str
.
rowValues
[
i
][
j
]
+=
","
;
if
(
IS_NUM
(
str
.
fieldTypes
[
j
]))
{
cout
<<
str
.
fieldTypes
[
j
]
<<
endl
;
cur
+=
str
.
rowValues
[
i
][
j
]
+=
","
;
}
else
{
cur
+=
string
(
"
\"
"
)
+=
str
.
rowValues
[
i
][
j
]
+=
"
\"
,"
;
}
}
cur
.
back
()
=
')'
;
cur
+=
","
;
...
...
@@ -855,7 +860,6 @@ main(int argc, char* argv[]) {
add
(
str
,
res
);
std
::
vector
<
string
>
res_query
;
construct_insert
(
str
,
table
,
res_query
);
for
(
auto
item
:
res_query
){
cout
<<
item
<<
endl
;
}
...
...
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