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
85bc73d7
Commit
85bc73d7
authored
3 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
STY: Style changes.
parent
2981cd26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#12622
passed
3 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Pipeline: caosdb-cppinttest
#12623
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/caosdb/utility.h
+2
-1
2 additions, 1 deletion
include/caosdb/utility.h
src/caosdb/entity.cpp
+1
-1
1 addition, 1 deletion
src/caosdb/entity.cpp
src/cxxcaosdbcli.cpp
+6
-6
6 additions, 6 deletions
src/cxxcaosdbcli.cpp
with
9 additions
and
8 deletions
include/caosdb/utility.h
+
2
−
1
View file @
85bc73d7
...
...
@@ -110,7 +110,8 @@ inline auto get_env_fallback(const char *key, const char *fallback) -> const cha
* @brief Return the value of an environment variable or - if undefined - the
* fallback value.
*/
inline
auto
get_env_fallback
(
const
std
::
string
&
key
,
const
std
::
string
&
fallback
)
->
const
std
::
string
{
inline
auto
get_env_fallback
(
const
std
::
string
&
key
,
const
std
::
string
&
fallback
)
->
const
std
::
string
{
const
char
*
val
=
get_env_fallback
(
key
.
c_str
(),
fallback
.
c_str
());
auto
const
result
=
std
::
string
(
val
);
...
...
This diff is collapsed.
Click to expand it.
src/caosdb/entity.cpp
+
1
−
1
View file @
85bc73d7
...
...
@@ -273,7 +273,7 @@ auto Entity::FixValue() -> void { FixValueImpl(this); }
// Utility functions //////////////////////////////////////////////////////////
// TODO(daniel) cognitive complexity is too high
template
<
typename
E
>
auto
FixValueImpl
(
E
*
ent
)
->
void
{
//NOLINT
template
<
typename
E
>
auto
FixValueImpl
(
E
*
ent
)
->
void
{
//
NOLINT
const
auto
&
dtype
=
ent
->
GetDataType
();
const
auto
&
value
=
ent
->
GetValue
();
auto
new_value
=
Value
();
...
...
This diff is collapsed.
Click to expand it.
src/cxxcaosdbcli.cpp
+
6
−
6
View file @
85bc73d7
...
...
@@ -26,13 +26,13 @@
#include
"caosdb/entity.h"
// for Entity
#include
"caosdb/exceptions.h"
// for ConfigurationError
#include
"caosdb/info.h"
// for VersionInfo
#include
"caosdb/logging.h"
// for CAOSDB_LOG_TRACE
#include
"caosdb/logging.h"
// for CAOSDB_LOG_TRACE
#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
auto
logger_name
=
"libcaosdb"
;
const
auto
logger_name
=
"libcaosdb"
;
auto
main
()
->
int
{
...
...
@@ -56,8 +56,8 @@ auto main() -> int {
transaction
->
RetrieveById
(
"120"
);
transaction
->
ExecuteAsynchronously
();
auto
t_stat
=
transaction
->
WaitForIt
();
CAOSDB_LOG_INFO
(
logger_name
)
<<
"status: "
<<
t_stat
.
GetCode
()
<<
" // "
<<
t_stat
.
GetDescription
();
CAOSDB_LOG_INFO
(
logger_name
)
<<
"status: "
<<
t_stat
.
GetCode
()
<<
" // "
<<
t_stat
.
GetDescription
();
const
auto
&
result_set
=
transaction
->
GetResultSet
();
if
(
result_set
.
size
()
>
0
)
{
// print information
...
...
@@ -80,8 +80,8 @@ auto main() -> int {
q_transaction
->
Query
(
query
);
q_transaction
->
ExecuteAsynchronously
();
t_stat
=
q_transaction
->
WaitForIt
();
CAOSDB_LOG_INFO
(
logger_name
)
<<
"status: "
<<
t_stat
.
GetCode
()
<<
" // "
<<
t_stat
.
GetDescription
();
CAOSDB_LOG_INFO
(
logger_name
)
<<
"status: "
<<
t_stat
.
GetCode
()
<<
" // "
<<
t_stat
.
GetDescription
();
return
0
;
}
catch
(
const
caosdb
::
exceptions
::
ConfigurationError
&
exc
)
{
std
::
cout
<<
"ConfigurationError: "
<<
exc
.
what
()
<<
std
::
endl
;
...
...
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