Skip to content

Commit ee88d80

Browse files
ulong for other stuff to parse
1 parent 06116a5 commit ee88d80

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/SQLite.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ public static string SqlDecl (TableMapping.Column p, bool storeDateTimeAsTicks,
27862786
public static string SqlType (TableMapping.Column p, bool storeDateTimeAsTicks, bool storeTimeSpanAsTicks)
27872787
{
27882788
var clrType = p.ColumnType;
2789-
if (clrType == typeof (Boolean) || clrType == typeof (Byte) || clrType == typeof (UInt16) || clrType == typeof (SByte) || clrType == typeof (Int16) || clrType == typeof (Int32) || clrType == typeof (UInt32) || clrType == typeof (Int64)) {
2789+
if (clrType == typeof (Boolean) || clrType == typeof (Byte) || clrType == typeof (UInt16) || clrType == typeof (SByte) || clrType == typeof (Int16) || clrType == typeof (Int32) || clrType == typeof (UInt32) || clrType == typeof (Int64) || clrType == typeof (UInt64) {
27902790
return "integer";
27912791
}
27922792
else if (clrType == typeof (Single) || clrType == typeof (Double) || clrType == typeof (Decimal)) {
@@ -3185,7 +3185,7 @@ internal static void BindParameter (Sqlite3Statement stmt, int index, object val
31853185
else if (value is Boolean) {
31863186
SQLite3.BindInt (stmt, index, (bool)value ? 1 : 0);
31873187
}
3188-
else if (value is UInt32 || value is Int64) {
3188+
else if (value is UInt32 || value is Int64 || value is UInt64) {
31893189
SQLite3.BindInt64 (stmt, index, Convert.ToInt64 (value));
31903190
}
31913191
else if (value is Single || value is Double || value is Decimal) {
@@ -3466,6 +3466,12 @@ internal static Action<object, Sqlite3Statement, int> GetFastSetter<T> (SQLiteCo
34663466
return SQLite3.ColumnInt64 (stmt, index);
34673467
});
34683468
}
3469+
else if (clrType == typeof(UInt64))
3470+
{
3471+
fastSetter = CreateNullableTypedSetterDelegate<T, UInt64>(column, (stmt, index) => {
3472+
return (ulong)SQLite3.ColumnInt64(stmt, index);
3473+
});
3474+
}
34693475
else if (clrType == typeof (UInt32)) {
34703476
fastSetter = CreateNullableTypedSetterDelegate<T, UInt32> (column, (stmt, index) => {
34713477
return (uint)SQLite3.ColumnInt64 (stmt, index);

0 commit comments

Comments
 (0)