objectbox / objectbox-python

Superfast on-device object & vector database for Python
https://objectbox.io/
Apache License 2.0
119 stars 18 forks source link

Add missing data types #5

Open vaind opened 4 years ago

vaind commented 4 years ago

model/properties.py currently handles the most common types. The missing types supported by ObjectBox should be added, e.g. date.

The list of currently supported objectbox types (as of objectbox-c v0.10.0):

typedef enum {
    OBXPropertyType_Bool = 1,    ///< 1 byte
    OBXPropertyType_Byte = 2,    ///< 1 byte
    OBXPropertyType_Short = 3,   ///< 2 bytes
    OBXPropertyType_Char = 4,    ///< 1 byte
    OBXPropertyType_Int = 5,     ///< 4 bytes
    OBXPropertyType_Long = 6,    ///< 8 bytes
    OBXPropertyType_Float = 7,   ///< 4 bytes
    OBXPropertyType_Double = 8,  ///< 8 bytes
    OBXPropertyType_String = 9,
    OBXPropertyType_Date = 10,  ///< Unix timestamp (milliseconds since 1970) in 8 bytes
    OBXPropertyType_Relation = 11,
    OBXPropertyType_DateNano = 12,  ///< Unix timestamp (nanoseconds since 1970) in 8 bytes
    OBXPropertyType_ByteVector = 23,
    OBXPropertyType_StringVector = 30,
} OBXPropertyType;
greenrobot commented 2 years ago

Scalar types were added via #11