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
b432ca19
Commit
b432ca19
authored
3 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Add OTHER_CLIENT_ERROR to EXTERN C interface
parent
e789ec01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!12
F consolidation
,
!8
ENH: Add retrieval and queries to Extern C interface
Pipeline
#11988
passed
3 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Pipeline: caosdb-cppinttest
#11989
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/ccaosdb.h
+6
-0
6 additions, 0 deletions
include/ccaosdb.h
src/ccaosdb.cpp
+4
-0
4 additions, 0 deletions
src/ccaosdb.cpp
test/test_ccaosdb.cpp
+5
-0
5 additions, 0 deletions
test/test_ccaosdb.cpp
with
15 additions
and
0 deletions
include/ccaosdb.h
+
6
−
0
View file @
b432ca19
...
...
@@ -52,6 +52,12 @@ int caosdb_constants_COMPATIBLE_SERVER_VERSION_PATCH();
*/
const
char
*
caosdb_constants_COMPATIBLE_SERVER_VERSION_PRE_RELEASE
();
/**
* Return the status code reserved for errors in clients wrapping this
* interface.
*/
int
caosdb_status_code_OTHER_CLIENT_ERROR
();
/**
* A wrapper of the C++ Connection class.
*
...
...
This diff is collapsed.
Click to expand it.
src/ccaosdb.cpp
+
4
−
0
View file @
b432ca19
...
...
@@ -164,6 +164,10 @@ const char *caosdb_constants_COMPATIBLE_SERVER_VERSION_PRE_RELEASE() {
return
caosdb
::
COMPATIBLE_SERVER_VERSION_PRE_RELEASE
;
}
int
caosdb_status_code_OTHER_CLIENT_ERROR
()
{
return
caosdb
::
StatusCode
::
OTHER_CLIENT_ERROR
;
}
const
char
*
caosdb_utility_get_env_var
(
const
char
*
name
,
const
char
*
fallback
)
{
return
caosdb
::
utility
::
get_env_var
(
name
,
fallback
);
}
...
...
This diff is collapsed.
Click to expand it.
test/test_ccaosdb.cpp
+
5
−
0
View file @
b432ca19
...
...
@@ -50,6 +50,11 @@ TEST_F(test_ccaosdb, test_get_env_var) {
EXPECT_EQ
(
"fall-back"
,
some_var
);
}
TEST_F
(
test_ccaosdb
,
test_other_client_error
)
{
EXPECT_EQ
(
caosdb_status_code_OTHER_CLIENT_ERROR
(),
caosdb
::
StatusCode
::
OTHER_CLIENT_ERROR
);
}
TEST_F
(
test_ccaosdb
,
test_get_default_connection
)
{
caosdb_connection_connection
out
;
...
...
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