ZipponDB/lib/types/out.zig
MrBounty 2a4842432d Speed up batch ADD and better bechmark
Now I flush only when the file is full and I check the the currently
used file if it is big enough.

So I dont get stat of all files and flush everytime like before
2025-01-07 13:55:02 +01:00

38 lines
922 B
Zig

// This file is just to expose what I need to grab
pub const UUID = @import("uuid.zig").UUID;
pub const Zero = @import("uuid.zig").zero;
pub const DateTime = @import("date.zig").DateTime;
pub const OR = @import("uuid.zig").OR;
pub const AND = @import("uuid.zig").AND;
pub const s2t = @import("stringToType.zig");
/// Suported dataType for the DB
/// Maybe start using a unionenum
pub const DataType = enum {
int,
float,
str,
bool,
link,
self, // self represent itself, it is the id
date,
time,
datetime,
int_array,
float_array,
str_array,
bool_array,
date_array,
time_array,
datetime_array,
link_array,
pub fn is_array(self: DataType) bool {
return switch (self) {
.int_array, .float_array, .str_array, .bool_array, .date_array, .time_array, .datetime_array, .link_array => true,
else => false,
};
}
};