| 1234567891011121314151617181920212223242526 |
- namespace InvercargillSql.Orm {
-
- public enum ColumnType {
- INT_32,
- INT_64,
- TEXT,
- BOOLEAN,
- DECIMAL,
- DATETIME,
- BINARY,
- UUID;
-
- public static ColumnType? from_gtype(Type type) {
- if (type == typeof(int)) return INT_32;
- if (type == typeof(int64)) return INT_64;
- if (type == typeof(int64?)) return INT_64;
- if (type == typeof(string)) return TEXT;
- if (type == typeof(bool)) return BOOLEAN;
- if (type == typeof(double) || type == typeof(float)) return DECIMAL;
- if (type == typeof(double?) || type == typeof(float?)) return DECIMAL;
- if (type == typeof(DateTime)) return DATETIME;
- if (type == typeof(Invercargill.BinaryData)) return BINARY;
- return null;
- }
- }
- }
|