当前位置: 首页>>代码示例>>C#>>正文


C# IDbHandle类代码示例

本文整理汇总了C#中IDbHandle的典型用法代码示例。如果您正苦于以下问题:C# IDbHandle类的具体用法?C# IDbHandle怎么用?C# IDbHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IDbHandle类属于命名空间,在下文中一共展示了IDbHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的IDbHandle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。