本文整理汇总了C#中IDbHandle类的典型用法代码示例。如果您正苦于以下问题:C# IDbHandle类的具体用法?C# IDbHandle怎么用?C# IDbHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDbHandle类属于命名空间,在下文中一共展示了IDbHandle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Open
public Result Open(string filename, out IDbHandle db)
{
Sqlite3.sqlite3 internalDbHandle = null;
var ret = (Result) Sqlite3.sqlite3_open(filename, ref internalDbHandle);
db = new DbHandle(internalDbHandle);
return ret;
}
开发者ID:giacatlaoboi,项目名称:SQLite.Net-PCL,代码行数:7,代码来源:IsqLite3ApiWp8.cs
示例2: ExtendedErrCode
public ExtendedResult ExtendedErrCode(IDbHandle db)
{
// not supported
return 0;
// var dbHandle = (DbHandle)db;
// return Sqlite3.sqlite3_extended_errcode(dbHandle.InternalDbHandle);
}
开发者ID:jamesottaway,项目名称:SQLite.Net-PCL,代码行数:7,代码来源:SQLiteApiWP8.cs
示例3: Open
public Result Open(byte[] filename, out IDbHandle db, int flags, IntPtr zvfs)
{
IntPtr dbPtr;
Result r = SQLiteApiWin32Internal.sqlite3_open_v2(filename, out dbPtr, flags, zvfs);
db = new DbHandle(dbPtr);
return r;
}
开发者ID:kevingy,项目名称:SQLite.Net-PCL,代码行数:7,代码来源:SQLiteApiWin32.cs
示例4: Open
public Result Open(byte[] filename, out IDbHandle db, int flags, IntPtr zVfs)
{
string dbFileName = Encoding.UTF8.GetString(filename, 0, filename.Length -1 );
Database internalDbHandle = null;
var ret = (Result)Sqlite3.sqlite3_open_v2(dbFileName, out internalDbHandle, flags, "");
db = new DbHandle(internalDbHandle);
return ret;
}
开发者ID:happynik,项目名称:SQLite.Net-PCL,代码行数:8,代码来源:SQLiteApiWP8.cs
示例5: MainWindow
public MainWindow()
{
InitializeComponent();
SelectedLanguage = "PL";
CookingBookLanguageSelect.ChangeLanuage(SelectedLanguage, this);
DbClient = DbDependancyResolver.Resolve<IDbHandle, SQLIteClient>();
}
开发者ID:leytoon,项目名称:MyPrograms,代码行数:10,代码来源:MainWindow.xaml.cs
示例6: Prepare2
public IDbStatement Prepare2(IDbHandle db, string query)
{
var internalDbHandle = (DbHandle) db;
IntPtr stmt;
Result r = SQLiteApiWin32Internal.sqlite3_prepare_v2(internalDbHandle.DbPtr, query, query.Length, out stmt, IntPtr.Zero);
if (r != Result.OK)
{
throw SQLiteException.New(r, Errmsg16(internalDbHandle));
}
return new DbStatement(stmt);
}
开发者ID:kevingy,项目名称:SQLite.Net-PCL,代码行数:11,代码来源:SQLiteApiWin32.cs
示例7: Prepare2
public IDbStatement Prepare2(IDbHandle db, string query)
{
var dbHandle = (DbHandle) db;
var stmt = new Sqlite3.Vdbe();
int r = Sqlite3.sqlite3_prepare_v2(dbHandle.InternalDbHandle, query, -1, ref stmt, 0);
if (r != 0)
{
throw SQLiteException.New((Result) r, GetErrmsg(db));
}
return new DbStatement(stmt);
}
开发者ID:giacatlaoboi,项目名称:SQLite.Net-PCL,代码行数:13,代码来源:IsqLite3ApiWp8.cs
示例8: MigrationBase2Base
public MigrationBase2Base(IDbHandle dbCli)
{
InitializeComponent();
MainDB = dbCli;
MainColection = new CookingBookDataCollection(dbCli);
MainColection.GetAll();
MainDbListViev.ItemsSource = MainColection.ListOfRecipes;
CollectionView MainRecipeViev = (CollectionView)CollectionViewSource.GetDefaultView(MainDbListViev.ItemsSource);
MainRecipeViev.Filter = (item => (String.IsNullOrEmpty(MainRecipeFilterText.Text) ? true : ((item as Recipe).Name.IndexOf(MainRecipeFilterText.Text, StringComparison.OrdinalIgnoreCase) >= 0)));
}
开发者ID:leytoon,项目名称:MyPrograms,代码行数:16,代码来源:MigrationBase2Base.xaml.cs
示例9: BackupInit
public IDbBackupHandle BackupInit(IDbHandle destHandle, string destName, IDbHandle srcHandle, string srcName)
{
var internalDestDb = (DbHandle)destHandle;
var internalSrcDb = (DbHandle)srcHandle;
IntPtr p = SQLiteApiAndroidCipherInternal.sqlite3_backup_init (internalDestDb.DbPtr,
destName,
internalSrcDb.DbPtr,
srcName);
if (p == IntPtr.Zero) {
return null;
} else {
return new DbBackupHandle (p);
}
}
开发者ID:xamarin-libraries,项目名称:xamarin-libraries,代码行数:16,代码来源:SQLiteApiAndroidCipher.cs
示例10: Open
public Result Open (byte[] filename, out IDbHandle db, int flags, IntPtr zvfs)
{
ActionsTaken.Add(string.Concat(filename.ToString(), "-Opened"));
db = new MockDbHandle ();
CreateStatementsExecuted = new List<string> ();
DeleteStatementsExecuted = new List<string> ();
InsertOrReplaceStatementsExecuted = new List<string> ();
InsertStatementsExecuted = new List<string> ();
UpdateStatementsExecuted = new List<string> ();
DropStatementsExecuted = new List<string> ();
SelectStatementsExecuted= new List<string> ();
return Result.OK;
}
开发者ID:ramonharrington,项目名称:Xamarin-Forms-Labs,代码行数:16,代码来源:MockSQLiteApi.cs
示例11: RecipesWindow
public RecipesWindow(IDbHandle dbCli)
{
InitializeComponent();
DbCli = dbCli;
DataCollection = new CookingBookDataCollection(DbCli);
MainGrid.DataContext = CookinBookDictionary.Instance.GetNames(MainWindow.SelectedLanguage);
RecipeListViev.ItemsSource = DataCollection.GetFullRecipeList();
AllComponentsViev.ItemsSource = DataCollection.GetFullComponentList();
CollectionView RecipeViev = (CollectionView)CollectionViewSource.GetDefaultView(RecipeListViev.ItemsSource);
RecipeViev.Filter = (item => (String.IsNullOrEmpty(RecipeFilterText.Text) ? true : ((item as Recipe).Name.IndexOf(RecipeFilterText.Text, StringComparison.OrdinalIgnoreCase) >= 0)));
CollectionView ComponentViev = (CollectionView)CollectionViewSource.GetDefaultView(AllComponentsViev.ItemsSource);
ComponentViev.Filter = (item => (String.IsNullOrEmpty(ComponentsFilterText.Text) ? true : ((item as Component).Name.IndexOf(ComponentsFilterText.Text, StringComparison.OrdinalIgnoreCase) >= 0)));
}
开发者ID:leytoon,项目名称:MyPrograms,代码行数:19,代码来源:RecipesWindow.xaml.cs
示例12: GetErrmsg
public string GetErrmsg(IDbHandle db)
{
var dbHandle = (DbHandle)db;
return Sqlite3.sqlite3_errmsg(dbHandle.InternalDbHandle);
}
开发者ID:giacatlaoboi,项目名称:SQLite.Net-PCL,代码行数:5,代码来源:IsqLite3ApiWp8.cs
示例13: Changes
public int Changes(IDbHandle db)
{
var internalDbHandle = (DbHandle) db;
return SQLiteApiWin32Internal.sqlite3_changes(internalDbHandle.DbPtr);
}
开发者ID:kevingy,项目名称:SQLite.Net-PCL,代码行数:5,代码来源:SQLiteApiWin32.cs
示例14: BusyTimeout
public Result BusyTimeout(IDbHandle db, int milliseconds)
{
var internalDbHandle = (DbHandle) db;
return SQLiteApiWin32Internal.sqlite3_busy_timeout(internalDbHandle.DbPtr, milliseconds);
}
开发者ID:kevingy,项目名称:SQLite.Net-PCL,代码行数:5,代码来源:SQLiteApiWin32.cs
示例15: Close
public Result Close(IDbHandle db)
{
var internalDbHandle = (DbHandle) db;
return SQLiteApiWin32Internal.sqlite3_close(internalDbHandle.DbPtr);
}
开发者ID:kevingy,项目名称:SQLite.Net-PCL,代码行数:5,代码来源:SQLiteApiWin32.cs
示例16: Changes
public int Changes(IDbHandle db)
{
var dbHandle = (DbHandle)db;
return SQLite3.Changes(dbHandle.InternalDbHandle);
}
开发者ID:kwchenjs,项目名称:SQLite.Net-PCL,代码行数:5,代码来源:SQLiteApiWinRT.cs
示例17: Equals
public bool Equals(IDbHandle other)
{
return other is DbHandle && InternalDbHandle == ((DbHandle)other).InternalDbHandle;
}
开发者ID:kwchenjs,项目名称:SQLite.Net-PCL,代码行数:4,代码来源:SQLiteApiWinRT.cs
示例18: Open
public Result Open(byte[] filename, out IDbHandle db, int flags, IntPtr zvfs)
{
string dbFileName = Encoding.UTF8.GetString(filename, 0, filename.Length);
Sqlite3DatabaseHandle internalDbHandle;
var ret = (Result)SQLite3.Open(dbFileName, out internalDbHandle, flags, zvfs);
db = new DbHandle(internalDbHandle);
return ret;
}
开发者ID:kwchenjs,项目名称:SQLite.Net-PCL,代码行数:8,代码来源:SQLiteApiWinRT.cs
示例19: Errmsg16
public string Errmsg16(IDbHandle db)
{
var dbHandle = (DbHandle)db;
return SQLite3.GetErrmsg(dbHandle.InternalDbHandle);
}
开发者ID:kwchenjs,项目名称:SQLite.Net-PCL,代码行数:5,代码来源:SQLiteApiWinRT.cs
示例20: EnableLoadExtension
public Result EnableLoadExtension(IDbHandle db, int onoff)
{
return (Result)1;
}
开发者ID:kwchenjs,项目名称:SQLite.Net-PCL,代码行数:4,代码来源:SQLiteApiWinRT.cs
注:本文中的IDbHandle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论