Skip to content
Snippets Groups Projects
Commit 81bc0fe0 authored by florian's avatar florian
Browse files

FIX: Export correct enum values

parent 13b09296
No related branches found
No related tags found
1 merge request!13ENH: Use new value and datatype structs
......@@ -29,7 +29,16 @@ export evaluate_return_code,
CaosDBException, ClientException, GenericCaosDBException, CaosDBMessage
# Exports from module Constants
# ...from Constants namespace
export COLLECTION, DATATYPE, IMPORTANCE, MIN_CCAOSDB_VERSION, ROLE
# ...from CaosDB datatypes
export BOOLEAN, DATETIME, DOUBLE, INTEGER, TEXT
# ...from CaosDB collections
export LIST
# ...from CaosDB entity roles
export FILE, PROPERTY, RECORD, RECORD_TYPE
# ...from CaosDB importances
export FIX, OBLIGATORY, RECOMMENDED, SUGGESTED
# Exports from module Utility
export get_ccaosdb_version, get_env_fallback
......
......@@ -23,8 +23,18 @@
module Constants
# exports from this module
export COLLECTION, DATATYPE, IMPORTANCE, MIN_CCAOSDB_VERSION, ROLE
# exports from the enum submodules
export BOOLEAN, DATETIME, DOUBLE, INTEGER, TEXT
export LIST
export FILE, PROPERTY, RECORD, RECORD_TYPE
export FIX, OBLIGATORY, RECOMMENDED, SUGGESTED
"""
The minimum version of CaosDB's cpplib and C interface that is
supported by this version of CaosDB.jl.
......@@ -34,6 +44,9 @@ const MIN_CCAOSDB_VERSION = v"0.0.17"
# enums have to be encapsulated in modules to prevent namespce conflicts, see
# https://bleepcoder.com/julia/413856244/feature-request-getproperty-on-enum-type-to-access-instances
module DATATYPE
export BOOLEAN, DATETIME, DOUBLE, INTEGER, TEXT
@enum _DATATYPE begin
UNSPECIFIED
BOOLEAN
......@@ -45,13 +58,18 @@ end
end
module COLLECTION
export LIST
@enum _COLLECTION begin
SCALAR
LIST
end
end
module ROLE
export FILE, PROPERTY, RECORD, RECORD_TYPE
@enum _ROLE begin
UNSPECIFIED
RECORD
......@@ -62,6 +80,9 @@ end
end
module IMPORTANCE
export FIX, OBLIGATORY, RECOMMENDED, SUGGESTED
@enum _IMPORTANCE begin
UNSPECIFIED
OBLIGATORY
......@@ -71,4 +92,12 @@ module IMPORTANCE
end
end
using .COLLECTION
using .DATATYPE
using .IMPORTANCE
using .ROLE
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment