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
ffda34c7
Commit
ffda34c7
authored
Oct 30, 2017
by
Casualet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add mcmd
parent
2bfed31a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
mcmd.cc
debug/mcmd.cc
+17
-9
No files found.
debug/mcmd.cc
View file @
ffda34c7
...
...
@@ -117,23 +117,34 @@ static void processSchemaInfo(SchemaInfo &schema){
}
}
static
std
::
unique_ptr
<
SchemaInfo
>
myLoadSchemaInfo
()
{
static
DBMeta
*
loadChildren
(
DBMeta
*
const
parent
,
std
::
unique_ptr
<
Connect
>
&
e_conn
){
auto
kids
=
parent
->
fetchChildren
(
e_conn
);
for
(
auto
it
:
kids
)
{
loadChildren
(
it
,
e_conn
);
}
return
parent
;
}
static
std
::
unique_ptr
<
SchemaInfo
>
myLoadSchemaInfo
(){
std
::
unique_ptr
<
Connect
>
e_conn
(
Connect
::
getEmbedded
(
embeddedDir
));
std
::
unique_ptr
<
SchemaInfo
>
schema
(
new
SchemaInfo
());
std
::
function
<
DBMeta
*
(
DBMeta
*
const
)
>
loadChildren
=
loadChildren
(
schema
.
get
(),
e_conn
);
// auto load = std::bind(loadChildren,std::placeholders::_1,e_conn);
/* std::function<DBMeta *(DBMeta *const)> loadChildren =
[&loadChildren, &e_conn](DBMeta *const parent) {
auto kids = parent->fetchChildren(e_conn);
for (auto it : kids) {
loadChildren(it);
}
return parent;
};
};
*/
//load all metadata and then store it in schema
loadChildren
(
schema
.
get
());
//loadChildren(schema.get());
// load(schema.get());
Analysis
analysis
(
std
::
string
(
"student"
),
*
schema
,
std
::
unique_ptr
<
AES_KEY
>
(
getKey
(
std
::
string
(
"113341234"
))),
SECURITY_RATING
::
SENSITIVE
);
//
Analysis analysis(std::string("student"),*schema,std::unique_ptr<AES_KEY>(getKey(std::string("113341234"))),
//
SECURITY_RATING::SENSITIVE);
return
schema
;
}
...
...
@@ -156,9 +167,6 @@ main() {
clients
[
client
]
->
ps
=
std
::
unique_ptr
<
ProxyState
>
(
new
ProxyState
(
*
shared_ps
));
clients
[
client
]
->
ps
->
safeCreateEmbeddedTHD
();
//Connect end!!
globalConn
=
new
Connect
(
ci
.
server
,
ci
.
user
,
ci
.
passwd
,
ci
.
port
);
std
::
unique_ptr
<
SchemaInfo
>
sm
=
myLoadSchemaInfo
();
processSchemaInfo
(
*
sm
);
return
0
;
...
...
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