Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-julialib
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-julialib
Commits
9cea0548
Commit
9cea0548
authored
3 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
F full ak
parent
b3074c88
No related branches found
No related tags found
2 merge requests
!9
F full
,
!8
F full ak
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/CaosDB.jl
+6
-1
6 additions, 1 deletion
src/CaosDB.jl
src/Entity.jl
+36
-1
36 additions, 1 deletion
src/Entity.jl
src/Transaction.jl
+86
-1
86 additions, 1 deletion
src/Transaction.jl
with
128 additions
and
3 deletions
src/CaosDB.jl
+
6
−
1
View file @
9cea0548
...
@@ -75,7 +75,9 @@ export append_parent,
...
@@ -75,7 +75,9 @@ export append_parent,
set_datatype
,
set_datatype
,
set_unit
,
set_unit
,
set_value
,
set_value
,
set_importance
set_importance
,
set_local_path
,
set_remote_path
# helper functions
# helper functions
export
has_errors
,
has_warnings
export
has_errors
,
has_warnings
...
@@ -84,6 +86,9 @@ export has_errors, has_warnings
...
@@ -84,6 +86,9 @@ export has_errors, has_warnings
export
create_transaction
,
export
create_transaction
,
add_retrieve_by_id
,
add_retrieve_by_id
,
add_insert_entity
,
add_insert_entity
,
add_update_entity
,
add_delete_by_id
,
add_retrieve_and_download_file_by_id
,
add_query
,
add_query
,
execute
,
execute
,
get_result_set
,
get_result_set
,
...
...
This diff is collapsed.
Click to expand it.
src/Entity.jl
+
36
−
1
View file @
9cea0548
...
@@ -62,7 +62,9 @@ export append_parent,
...
@@ -62,7 +62,9 @@ export append_parent,
set_datatype
,
set_datatype
,
set_unit
,
set_unit
,
set_value
,
set_value
,
set_importance
set_importance
,
set_local_path
,
set_remote_path
# helper functions
# helper functions
export
has_errors
,
has_warnings
export
has_errors
,
has_warnings
...
@@ -1733,6 +1735,39 @@ function set_importance(property::Ref{_Property}, importance::AbstractString)
...
@@ -1733,6 +1735,39 @@ function set_importance(property::Ref{_Property}, importance::AbstractString)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
end
end
"""
function set_local_path(entity::Ref{_Entity}, path::AbstractString)
Set the local path of the given `entity` object.
"""
function
set_local_path
(
entity
::
Ref
{
_Entity
},
path
::
AbstractString
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_set_local_path
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Cstring
),
entity
,
path
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
end
"""
function set_remote_path(entity::Ref{_Entity}, path::AbstractString)
Set the remote file path of the given `entity` object.
"""
function
set_remote_path
(
entity
::
Ref
{
_Entity
},
path
::
AbstractString
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_set_file_path
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Cstring
),
entity
,
path
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
end
"""
"""
function append_parent(entity::Ref{_Entity}, parent::Ref{_Parent})
function append_parent(entity::Ref{_Entity}, parent::Ref{_Parent})
...
...
This diff is collapsed.
Click to expand it.
src/Transaction.jl
+
86
−
1
View file @
9cea0548
...
@@ -27,6 +27,9 @@ export create_transaction,
...
@@ -27,6 +27,9 @@ export create_transaction,
add_retrieve_by_id
,
add_retrieve_by_id
,
add_query
,
add_query
,
add_insert_entity
,
add_insert_entity
,
add_update_entity
,
add_delete_by_id
,
add_retrieve_and_download_file_by_id
,
execute
,
execute
,
get_result_set
,
get_result_set
,
get_count_result
,
get_count_result
,
...
@@ -147,7 +150,10 @@ Add a sub-request to insert a single entity to the given `transaction`.
...
@@ -147,7 +150,10 @@ Add a sub-request to insert a single entity to the given `transaction`.
This does not execute the transaction.
This does not execute the transaction.
"""
"""
function
add_insert_entity
(
transaction
::
Ref
{
_Transaction
},
entity
::
Ref
{
CaosDB
.
Entity
.
_Entity
})
function
add_insert_entity
(
transaction
::
Ref
{
_Transaction
},
entity
::
Ref
{
CaosDB
.
Entity
.
_Entity
},
)
err_code
=
ccall
(
err_code
=
ccall
(
(
:
caosdb_transaction_transaction_insert_entity
,
CaosDB
.
library_name
),
(
:
caosdb_transaction_transaction_insert_entity
,
CaosDB
.
library_name
),
...
@@ -159,6 +165,51 @@ function add_insert_entity(transaction::Ref{_Transaction}, entity::Ref{CaosDB.En
...
@@ -159,6 +165,51 @@ function add_insert_entity(transaction::Ref{_Transaction}, entity::Ref{CaosDB.En
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
end
end
"""
function add_update_entity(transaction::Ref{_Transaction}, entity::Ref{_CaosDB.Entity.Entity})
Add a sub-request to update a single entity to the given `transaction`.
!!! info
This does not execute the transaction.
"""
function
add_update_entity
(
transaction
::
Ref
{
_Transaction
},
entity
::
Ref
{
CaosDB
.
Entity
.
_Entity
},
)
err_code
=
ccall
(
(
:
caosdb_transaction_transaction_update_entity
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Transaction
},
Ref
{
CaosDB
.
Entity
.
_Entity
}),
transaction
,
entity
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
end
"""
function add_delete_by_id(transaction::Ref{_Transaction}, id::AbstractString)
Add a sub-request to delete a single entity to the given `transaction`.
!!! info
This does not execute the transaction.
"""
function
add_delete_by_id
(
transaction
::
Ref
{
_Transaction
},
id
::
AbstractString
)
err_code
=
ccall
(
(
:
caosdb_transaction_transaction_delete_by_id
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Transaction
},
Cstring
),
transaction
,
id
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
end
"""
"""
function add_retrieve_by_id(
function add_retrieve_by_id(
...
@@ -191,6 +242,40 @@ function add_retrieve_by_id(
...
@@ -191,6 +242,40 @@ function add_retrieve_by_id(
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
end
end
"""
function add_retrieve_and_download_file_by_id(
transaction::Ref{_Transaction},
id::AbstractString,
path::AbstractString,
)
Add a sub-request to retrieve and download a single entity (File) to the given `transaction`.
!!! info
This does not execute the transaction.
"""
function
add_retrieve_and_download_file_by_id
(
transaction
::
Ref
{
_Transaction
},
id
::
AbstractString
,
path
::
AbstractString
,
)
err_code
=
ccall
(
(
:
caosdb_transaction_transaction_retrieve_and_download_file_by_id
,
CaosDB
.
library_name
,
),
Cint
,
(
Ref
{
_Transaction
},
Cstring
,
Cstring
),
transaction
,
id
,
path
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
end
"""
"""
function add_query(transaction::Ref{_Transaction}, query::AbstractString)
function add_query(transaction::Ref{_Transaction}, query::AbstractString)
...
...
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