JULEA
jdb-type.h
Go to the documentation of this file.
1 /*
2  * JULEA - Flexible storage framework
3  * Copyright (C) 2019 Benjamin Warnke
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
23 #ifndef JULEA_DB_TYPE_H
24 #define JULEA_DB_TYPE_H
25 
26 #if !defined(JULEA_DB_H) && !defined(JULEA_DB_COMPILATION)
27 #error "Only <julea-db.h> can be included directly."
28 #endif
29 
30 #include <glib.h>
31 
32 G_BEGIN_DECLS
33 
34 enum JDBType
35 {
45 };
46 
47 typedef enum JDBType JDBType;
48 
50 {
51  guint32 val_uint32;
52  gint32 val_sint32;
53  guint64 val_uint64;
54  gint64 val_sint64;
55  gdouble val_float64;
56  gfloat val_float32;
57  gchar const* val_string;
58 
59  struct
60  {
61  gchar const* val_blob;
62  guint32 val_blob_length;
63  };
64 };
65 
66 typedef union JDBTypeValue JDBTypeValue;
67 
68 G_END_DECLS
69 
70 #endif
JDBType
Definition: jdb-type.h:35
@ J_DB_TYPE_FLOAT32
Definition: jdb-type.h:38
@ J_DB_TYPE_ID
Definition: jdb-type.h:44
@ J_DB_TYPE_SINT32
Definition: jdb-type.h:36
@ J_DB_TYPE_SINT64
Definition: jdb-type.h:39
@ J_DB_TYPE_UINT64
Definition: jdb-type.h:40
@ J_DB_TYPE_BLOB
Definition: jdb-type.h:43
@ J_DB_TYPE_STRING
Definition: jdb-type.h:42
@ J_DB_TYPE_FLOAT64
Definition: jdb-type.h:41
@ J_DB_TYPE_UINT32
Definition: jdb-type.h:37
Definition: jdb-type.h:50
guint64 val_uint64
Definition: jdb-type.h:53
gdouble val_float64
Definition: jdb-type.h:55
gint32 val_sint32
Definition: jdb-type.h:52
gfloat val_float32
Definition: jdb-type.h:56
gchar const * val_string
Definition: jdb-type.h:57
gchar const * val_blob
Definition: jdb-type.h:61
guint32 val_blob_length
Definition: jdb-type.h:62
gint64 val_sint64
Definition: jdb-type.h:54
guint32 val_uint32
Definition: jdb-type.h:51