1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

orm,sqlite,mysql,pg: cleanup import v.ast, using typeof[Type]()

This commit is contained in:
Delyan Angelov
2022-12-07 12:26:41 +02:00
parent 4eb81d2f05
commit 458e68e196
5 changed files with 49 additions and 54 deletions

View File

@ -1,39 +1,38 @@
module orm
import time
import v.ast
pub const (
num64 = [ast.i64_type_idx, ast.u64_type_idx]
num64 = [typeof[i64]().idx, typeof[u64]().idx]
nums = [
ast.i8_type_idx,
ast.i16_type_idx,
ast.int_type_idx,
ast.u8_type_idx,
ast.u16_type_idx,
ast.u32_type_idx,
ast.bool_type_idx,
typeof[i8]().idx,
typeof[i16]().idx,
typeof[int]().idx,
typeof[u8]().idx,
typeof[u16]().idx,
typeof[u32]().idx,
typeof[bool]().idx,
]
float = [
ast.f32_type_idx,
ast.f64_type_idx,
typeof[f32]().idx,
typeof[f64]().idx,
]
type_string = ast.string_type_idx
type_string = typeof[string]().idx
time = -2
serial = -1
type_idx = {
'i8': ast.i8_type_idx
'i16': ast.i16_type_idx
'int': ast.int_type_idx
'i64': ast.i64_type_idx
'u8': ast.u8_type_idx
'u16': ast.u16_type_idx
'u32': ast.u32_type_idx
'u64': ast.u64_type_idx
'f32': ast.f32_type_idx
'f64': ast.f64_type_idx
'bool': ast.bool_type_idx
'string': ast.string_type_idx
'i8': typeof[i8]().idx
'i16': typeof[i16]().idx
'int': typeof[int]().idx
'i64': typeof[i64]().idx
'u8': typeof[u8]().idx
'u16': typeof[u16]().idx
'u32': typeof[u32]().idx
'u64': typeof[u64]().idx
'f32': typeof[f32]().idx
'f64': typeof[f64]().idx
'bool': typeof[bool]().idx
'string': typeof[string]().idx
}
string_max_len = 2048
)