Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Runtime/SQLiteExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public enum DeserializeFlags : uint

[DllImport(LibraryPath, EntryPoint = "sqlite3_deserialize", CallingConvention = CallingConvention.Cdecl)]
public static extern Result Deserialize(IntPtr db, [MarshalAs(UnmanagedType.LPStr)] string zSchema, byte[] pData, long szDb, long szBuf, DeserializeFlags mFlags);

[DllImport(LibraryPath, EntryPoint = "sqlite3_deserialize", CallingConvention = CallingConvention.Cdecl)]
public static unsafe extern Result Deserialize(IntPtr db, [MarshalAs(UnmanagedType.LPStr)] string zSchema, void* pData, long szDb, long szBuf, DeserializeFlags mFlags);

Expand Down Expand Up @@ -84,35 +84,35 @@ static SQLite3()

public static class ISQLiteConnectionExtensions
{
public static int Insert<T>(this ISQLiteConnection connection, ref T obj)
public static int Insert<T>(this ISQLiteConnection connection, ref T obj, string tableName = "")
{
object boxed = obj;
int result = connection.Insert(boxed);
obj = (T) boxed;
int result = connection.Insert(boxed, tableName);
obj = (T)boxed;
return result;
}

public static int Insert<T>(this ISQLiteConnection connection, ref T obj, Type objType)
public static int Insert<T>(this ISQLiteConnection connection, ref T obj, Type objType, string tableName = "")
{
object boxed = obj;
int result = connection.Insert(boxed, objType);
obj = (T) boxed;
int result = connection.Insert(boxed, objType, tableName);
obj = (T)boxed;
return result;
}

public static int Insert<T>(this ISQLiteConnection connection, ref T obj, string extra)
public static int Insert<T>(this ISQLiteConnection connection, ref T obj, string extra, string tableName = "")
{
object boxed = obj;
int result = connection.Insert(boxed, extra);
obj = (T) boxed;
int result = connection.Insert(boxed, extra, tableName);
obj = (T)boxed;
return result;
}

public static int Insert<T>(this ISQLiteConnection connection, ref T obj, string extra, Type objType)
public static int Insert<T>(this ISQLiteConnection connection, ref T obj, string extra, Type objType, string tableName = "")
{
object boxed = obj;
int result = connection.Insert(boxed, extra, objType);
obj = (T) boxed;
int result = connection.Insert(boxed, extra, objType, tableName);
obj = (T)boxed;
return result;
}
}
Expand Down
Loading