db_types.anubis
911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Created by PyramIDE.
* User: Totoro
* Date: 14/11/2011
* Time: 22:41
*
*/
transmit tools/basis.anubis
public type DB_id:
none,
db_id(Int value).
public type DB_datetime:
datetime(String datetime).
public type DB_date:
date(String date).
public type DB_integer:
db_integer(Int value).
public define String
to_String
(
DB_id idx
)=
if idx is
{
none then "none",
db_id(idx) then abs_to_decimal(idx)
}.
public define String
to_String
(
DB_date d
)=
date(d).
public define String
to_String
(
DB_datetime d
)=
datetime(d).
public define String
to_DBString
(
Bool value
)=
if value then "1" else "0".
public define Int
to_DBInt
(
Bool value
)=
if value then 1 else 0.
public type SQLite3_update_field:
field(String column, SQLite3Bind bind).
* Some Bind helper *