Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cpplib
Commits
62c0ced5
Commit
62c0ced5
authored
3 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-full-c
parents
ccf20764
4319b3dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
ENH: Allow insert/update/delete and files in Extern C
Pipeline
#12500
failed
3 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+2
-0
2 additions, 0 deletions
.gitlab-ci.yml
src/caosdb/unary_rpc_handler.cpp
+1
-0
1 addition, 0 deletions
src/caosdb/unary_rpc_handler.cpp
src/cxxcaosdbcli.cpp
+18
-6
18 additions, 6 deletions
src/cxxcaosdbcli.cpp
with
21 additions
and
6 deletions
.gitlab-ci.yml
+
2
−
0
View file @
62c0ced5
...
...
@@ -91,6 +91,8 @@ test:
-
cmake -DCMAKE_BUILD_TYPE=Debug ..
-
cmake --build . -j
-
cmake --build . -j --target unit_test_coverage
-
cmake --build . -j --target cxxcaosdbcli
-
cmake --build . -j --target ccaosdbcli
# trigger the integration tests
trigger_inttest
:
...
...
This diff is collapsed.
Click to expand it.
src/caosdb/unary_rpc_handler.cpp
+
1
−
0
View file @
62c0ced5
...
...
@@ -83,6 +83,7 @@ bool UnaryRpcHandler::OnNext(bool ok) {
// with the fail-fast option. (Note that async unary RPCs don't post a CQ
// tag at this point, nor do client-streaming or bidi-streaming RPCs that
// have the initial metadata corked option set.)"
return
false
;
}
return
true
;
...
...
This diff is collapsed.
Click to expand it.
src/cxxcaosdbcli.cpp
+
18
−
6
View file @
62c0ced5
...
...
@@ -26,7 +26,7 @@
#include
"caosdb/entity.h"
// for Entity
#include
"caosdb/exceptions.h"
// for ConfigurationError
#include
"caosdb/info.h"
// for VersionInfo
#include
"caosdb/transaction.h"
// for Transaction,
UniqueResult,
ResultSet
#include
"caosdb/transaction.h"
// for Transaction, ResultSet
#include
<iostream>
// for operator<<, basic_ostream, basic_ost...
#include
<memory>
// for unique_ptr, allocator, __shared_ptr_...
#include
<string>
// for operator<<, char_traits
...
...
@@ -50,17 +50,29 @@ auto main() -> int {
// retrieve an entity
auto
transaction
(
connection
->
CreateTransaction
());
transaction
->
RetrieveById
(
"20"
);
transaction
->
RetrieveById
(
"
1
20"
);
transaction
->
Execute
();
const
auto
&
result_set
=
dynamic_cast
<
const
caosdb
::
transaction
::
UniqueResult
&>
(
transaction
->
GetResultSet
());
const
auto
&
result_set
=
transaction
->
GetResultSet
();
// print description
std
::
cout
<<
"Entity Description: "
<<
result_set
.
GetEntity
().
GetDescription
()
<<
std
::
endl
;
// print information
const
auto
&
ent
=
result_set
.
at
(
0
);
const
auto
&
props
=
ent
.
GetProperties
();
std
::
cout
<<
"Entity Name: "
<<
ent
.
GetName
()
<<
std
::
endl
;
std
::
cout
<<
"Entity Description: "
<<
ent
.
GetDescription
()
<<
std
::
endl
;
std
::
cout
<<
"Entity Properties: "
<<
std
::
endl
;
for
(
const
auto
&
prop
:
props
)
{
std
::
cout
<<
"----------
\n
"
<<
prop
.
ToString
()
<<
std
::
endl
;
}
return
0
;
}
catch
(
const
caosdb
::
exceptions
::
ConfigurationError
&
exc
)
{
std
::
cout
<<
"ConfigurationError: "
<<
exc
.
what
()
<<
std
::
endl
;
return
exc
.
GetCode
();
}
catch
(
const
std
::
exception
&
exc
)
{
std
::
cout
<<
"Exception: "
<<
exc
.
what
()
<<
std
::
endl
;
return
1
;
}
catch
(...)
{
std
::
cout
<<
"Some other exception."
<<
std
::
endl
;
return
2
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment