예제 #1
0
 internal static EsentTable Open(EsentDatabase database, string name)
 {
     return(new EsentTable
     {
         Database = database,
         Name = name
     }.Open());
 }
예제 #2
0
        public EsentDatabase OpenDatabase(string path)
        {
            CheckState();
            var db = EsentDatabase.Open(this, path);

            Holding.Add(db);
            return(db);
        }
예제 #3
0
        public EsentDatabase CreateDatabase(string path, bool overwrite)
        {
            CheckState();
            var db = EsentDatabase.Create(this, path, overwrite);

            Holding.Add(db);
            return(db);
        }
예제 #4
0
 internal static bool TryOpen(EsentDatabase database, string name, out EsentTable table)
 {
     table = new EsentTable
     {
         Database = database,
         Name     = name
     };
     return(table.TryOpen(out table));
 }
예제 #5
0
        internal static EsentTable Create(EsentDatabase database, string name, int pages, int density)
        {
            var table = new EsentTable
            {
                Database = database,
                Name     = name
            };

            Api.JetCreateTable(database.Session.JetId, database.JetId, name, pages, density, out table.JetId);
            table.Opened = true;
            return(table);
        }
예제 #6
0
        internal static EsentDatabase Create(EsentSession session, string path, bool overwrite)
        {
            var db = new EsentDatabase
            {
                Session  = session,
                FilePath = path
            };

            Api.JetCreateDatabase(session.JetId, path, null, out db.JetId,
                                  overwrite ? CreateDatabaseGrbit.OverwriteExisting : CreateDatabaseGrbit.None);
            db.Opened = true;
            return(db);
        }
예제 #7
0
 internal static void Drop(EsentDatabase database, string name)
 {
     Api.JetDeleteTable(database.Session.JetId, database.JetId, name);
 }