123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Data;
- using OpenMetaverse;
- using OpenSim.Framework;
- #if CSharpSqlite
- using Community.CsharpSqlite.Sqlite;
- #else
- using Mono.Data.Sqlite;
- #endif
- namespace OpenSim.Data.SQLite
- {
-
-
-
- public class SQLiteFramework
- {
- protected Object m_lockObject = new Object();
- protected SQLiteFramework(string connectionString)
- {
- }
-
-
-
-
-
- protected int ExecuteNonQuery(SqliteCommand cmd, SqliteConnection connection)
- {
- lock (connection)
- {
- cmd.Connection = connection;
-
- return cmd.ExecuteNonQuery();
- }
- }
- protected IDataReader ExecuteReader(SqliteCommand cmd, SqliteConnection connection)
- {
- lock (connection)
- {
-
-
-
-
- cmd.Connection = connection;
-
- return cmd.ExecuteReader();
- }
- }
- protected void CloseCommand(SqliteCommand cmd)
- {
- cmd.Connection.Close();
- cmd.Connection.Dispose();
- cmd.Dispose();
- }
- }
- }
|