• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# JET_INSTANCE类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



JET_INSTANCE类属于命名空间,在下文中一共展示了JET_INSTANCE类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AbstractActions

        protected AbstractActions(JET_INSTANCE instance, ColumnsInformation columnsInformation, string database, Guid instanceId)
        {
            logger = LogManager.GetLogger(GetType());
            try
            {
                this.instanceId = instanceId;
                ColumnsInformation = columnsInformation;
                session = new Session(instance);

                transaction = new Transaction(session);
                Api.JetOpenDatabase(session, database, null, out dbid, OpenDatabaseGrbit.None);

                queues = new EsentTable(session, new Table(session, dbid, "queues", OpenTableGrbit.None));
                subqueues = new EsentTable(session, new Table(session, dbid, "subqueues", OpenTableGrbit.None));
                txs = new EsentTable(session, new Table(session, dbid, "transactions", OpenTableGrbit.None));
                recovery = new EsentTable(session, new Table(session, dbid, "recovery", OpenTableGrbit.None));
                outgoing = new EsentTable(session, new Table(session, dbid, "outgoing", OpenTableGrbit.None));
                outgoingHistory = new EsentTable(session, new Table(session, dbid, "outgoing_history", OpenTableGrbit.None));
                recveivedMsgs = new EsentTable(session, new Table(session, dbid, "recveived_msgs", OpenTableGrbit.None));
            }
            catch (Exception)
            {
                Dispose();
                throw;
            }
        }
开发者ID:jmptrader,项目名称:LightningQueues,代码行数:26,代码来源:AbstractActions.cs


示例2: ConfigureInstance

		public InstanceParameters ConfigureInstance(JET_INSTANCE jetInstance, string path)
		{
			path = Path.GetFullPath(path);
			var logsPath = path;
			if (string.IsNullOrEmpty(configuration.Settings["Raven/Esent/LogsPath"]) == false)
			{
				logsPath = configuration.Settings["Raven/Esent/LogsPath"].ToFullPath();
			}
			var circularLog = GetValueFromConfiguration("Raven/Esent/CircularLog", true);
			var logFileSizeInMb = GetValueFromConfiguration("Raven/Esent/LogFileSize", 64);
			logFileSizeInMb = Math.Max(1, logFileSizeInMb / 4);
			var instanceParameters = new InstanceParameters(jetInstance)
			{
				CircularLog = circularLog,
				Recovery = true,
				NoInformationEvent = false,
				CreatePathIfNotExist = true,
				EnableIndexChecking = true,
				TempDirectory = Path.Combine(logsPath, "temp"),
				SystemDirectory = Path.Combine(logsPath, "system"),
				LogFileDirectory = Path.Combine(logsPath, "logs"),
				MaxVerPages = TranslateToSizeInVersionPages(GetValueFromConfiguration("Raven/Esent/MaxVerPages", 512), 1024 * 1024),
				PreferredVerPages = TranslateToSizeInVersionPages(GetValueFromConfiguration("Raven/Esent/PreferredVerPages", 472), 1024 * 1024),
				BaseName = "RVN",
				EventSource = "Raven",
				LogBuffers = TranslateToSizeInDatabasePages(GetValueFromConfiguration("Raven/Esent/LogBuffers", 8192), 1024),
				LogFileSize = (logFileSizeInMb * 1024),
				MaxSessions = MaxSessions,
				MaxCursors = GetValueFromConfiguration("Raven/Esent/MaxCursors", 2048),
				DbExtensionSize = TranslateToSizeInDatabasePages(GetValueFromConfiguration("Raven/Esent/DbExtensionSize", 8), 1024 * 1024),
				AlternateDatabaseRecoveryDirectory = path
			};

			return instanceParameters;
		}
开发者ID:synhershko,项目名称:ravendb,代码行数:35,代码来源:TransactionalStorageConfigurator.cs


示例3: InitColumDictionaries

		public void InitColumDictionaries(JET_INSTANCE instance, string database)
	    {
	        using (var session = new Session(instance))
	        {
	            var dbid = JET_DBID.Nil;
	            try
	            {
	                Api.JetOpenDatabase(session, database, null, out dbid, OpenDatabaseGrbit.None);
	                using (var usage = new Table(session, dbid, "usage", OpenTableGrbit.None))
						UsageColumns = Api.GetColumnDictionary(session, usage);
					using (var details = new Table(session, dbid, "details", OpenTableGrbit.None))
						DetailsColumns = Api.GetColumnDictionary(session, details);
					using (var pages = new Table(session, dbid, "pages", OpenTableGrbit.None))
						PagesColumns = Api.GetColumnDictionary(session, pages);
	                using (var files = new Table(session, dbid, "files", OpenTableGrbit.None))
	                    FilesColumns = Api.GetColumnDictionary(session, files);
					using (var signatures = new Table(session, dbid, "signatures", OpenTableGrbit.None))
						SignaturesColumns = Api.GetColumnDictionary(session, signatures);
					using (var config = new Table(session, dbid, "config", OpenTableGrbit.None))
						ConfigColumns = Api.GetColumnDictionary(session, config);
	            }
	            finally
	            {
	                if (Equals(dbid, JET_DBID.Nil) == false)
	                    Api.JetCloseDatabase(session, dbid, CloseDatabaseGrbit.None);
	            }
	        }
	    }
开发者ID:hibernating-rhinos,项目名称:RavenFS,代码行数:28,代码来源:TableColumnsCache.cs


示例4: StorageActionsAccessor

		public StorageActionsAccessor(TableColumnsCache tableColumnsCache, JET_INSTANCE instance, string databaseName, UuidGenerator uuidGenerator, OrderedPartCollection<AbstractFileCodec> fileCodecs)
		{
			this.tableColumnsCache = tableColumnsCache;
			this.uuidGenerator = uuidGenerator;
			this.fileCodecs = fileCodecs;
			try
			{
				session = new Session(instance);
				transaction = new Transaction(session);
				Api.JetOpenDatabase(session, databaseName, null, out database, OpenDatabaseGrbit.None);
			}
			catch (Exception original)
			{
				log.WarnException("Could not create accessor", original);
				try
				{
					Dispose();
				}
				catch (Exception e)
				{
					log.WarnException("Could not properly dispose accessor after exception in ctor.", e);
				}
				throw;
			}
		}
开发者ID:GorelH,项目名称:ravendb,代码行数:25,代码来源:StorageActionsAccessor.cs


示例5: DocumentStorageActions

		public DocumentStorageActions(
			JET_INSTANCE instance,
			string database,
			TableColumnsCache tableColumnsCache,
			OrderedPartCollection<AbstractDocumentCodec> documentCodecs,
			IUuidGenerator uuidGenerator,
			IDocumentCacher cacher,
			TransactionalStorage transactionalStorage)
		{
			this.tableColumnsCache = tableColumnsCache;
			this.documentCodecs = documentCodecs;
			this.uuidGenerator = uuidGenerator;
			this.cacher = cacher;
			this.transactionalStorage = transactionalStorage;
			try
			{
				session = new Session(instance);
				transaction = new Transaction(session);
				Api.JetOpenDatabase(session, database, null, out dbid, OpenDatabaseGrbit.None);
			}
			catch (Exception)
			{
				Dispose();
				throw;
			}
		}
开发者ID:carlosagsmendes,项目名称:ravendb,代码行数:26,代码来源:General.cs


示例6: ConfigureInstance

		public void ConfigureInstance(JET_INSTANCE jetInstance, string path)
		{
			path = Path.GetFullPath(path);
			var logsPath = path;
			if (string.IsNullOrEmpty(configuration.Settings["Raven/Esent/LogsPath"]) == false)
			{
				logsPath = configuration.Settings["Raven/Esent/LogsPath"].ToFullPath();
			}
			new InstanceParameters(jetInstance)
			{
				CircularLog = true,
				Recovery = true,
				NoInformationEvent = false,
				CreatePathIfNotExist = true,
				TempDirectory = Path.Combine(logsPath, "temp"),
				SystemDirectory = Path.Combine(logsPath, "system"),
				LogFileDirectory = Path.Combine(logsPath, "logs"),
				MaxVerPages = TranslateToSizeInDatabasePages(GetValueFromConfiguration("Raven/Esent/MaxVerPages", 128)),
				BaseName = "RVN",
				EventSource = "Raven",
				LogBuffers = TranslateToSizeInDatabasePages(GetValueFromConfiguration("Raven/Esent/LogBuffers", 16)) / 2,
				LogFileSize = GetValueFromConfiguration("Raven/Esent/LogFileSize", 16) * 1024,
				MaxSessions = MaxSessions,
				MaxCursors = GetValueFromConfiguration("Raven/Esent/MaxCursors", 2048),
				DbExtensionSize = TranslateToSizeInDatabasePages(GetValueFromConfiguration("Raven/Esent/DbExtensionSize", 16)),
				AlternateDatabaseRecoveryDirectory = path
			};
		}
开发者ID:nzdunic,项目名称:ravendb,代码行数:28,代码来源:TransactionalStorageConfigurator.cs


示例7: HiLoVersionGenerator

 public HiLoVersionGenerator(JET_INSTANCE instance, int capacity, string database)
 {
     this.instance = instance;
     this.capacity = capacity;
     this.database = database;
     currentHi = GenerateNextHi();
     currentLo = 0;
 }
开发者ID:ayende,项目名称:rhino-pht,代码行数:8,代码来源:HiLoVersionGenerator.cs


示例8: ConfigureInstance

		public InstanceParameters ConfigureInstance(JET_INSTANCE jetInstance, string path)
		{
			path = Path.GetFullPath(path);
			var logsPath = path;
			var configuredLogsPath = Configuration.Settings["Raven/Esent/LogsPath"] ?? Configuration.Settings[Constants.RavenTxJournalPath] ?? Configuration.JournalsStoragePath;
			if (string.IsNullOrEmpty(configuredLogsPath) == false)
			{
				logsPath = configuredLogsPath.ToFullPath();
			}
			var circularLog = GetValueFromConfiguration("Raven/Esent/CircularLog", true);
			var logFileSizeInMb = GetValueFromConfiguration("Raven/Esent/LogFileSize", 64);
			logFileSizeInMb = Math.Max(1, logFileSizeInMb / 4);
			var maxVerPages = GetValueFromConfiguration("Raven/Esent/MaxVerPages", 512);
			
			var maxVerPagesResult = TranslateToSizeInVersionPages(maxVerPages, 1024 * 1024);

			ConfigureInstanceInternal(maxVerPages);

			var instanceParameters = new InstanceParameters(jetInstance)
			{
				CircularLog = circularLog,
				Recovery = true,
				NoInformationEvent = false,
				CreatePathIfNotExist = true,
				EnableIndexChecking = true,
				TempDirectory = Path.Combine(logsPath, "temp"),
				SystemDirectory = Path.Combine(logsPath, "system"),
				LogFileDirectory = Path.Combine(logsPath, "logs"),
				MaxVerPages = maxVerPagesResult,
				PreferredVerPages = TranslateToSizeInVersionPages(GetValueFromConfiguration("Raven/Esent/PreferredVerPages", (int)(maxVerPagesResult * 0.85)), 1024 * 1024),
				BaseName = BaseName,
				EventSource = EventSource,
				LogBuffers = TranslateToSizeInDatabasePages(GetValueFromConfiguration("Raven/Esent/LogBuffers", 8192), 1024),
				LogFileSize = (logFileSizeInMb * 1024),
				MaxSessions = MaxSessions,
				MaxCursors = GetValueFromConfiguration("Raven/Esent/MaxCursors", 2048),
				DbExtensionSize = TranslateToSizeInDatabasePages(GetValueFromConfiguration("Raven/Esent/DbExtensionSize", 8), 1024 * 1024),
				AlternateDatabaseRecoveryDirectory = path
			};

			if (Environment.OSVersion.Version >= new Version(5, 2))
			{
				// JET_paramEnableIndexCleanup is not supported on WindowsXP
				const int JET_paramEnableIndexCleanup = 54;
				Api.JetSetSystemParameter(jetInstance, JET_SESID.Nil, (JET_param)JET_paramEnableIndexCleanup, 1, null);
			}

			Log.Info(@"Esent Settings:
  MaxVerPages      = {0}
  CacheSizeMax     = {1}
  DatabasePageSize = {2}", instanceParameters.MaxVerPages, SystemParameters.CacheSizeMax,
					 SystemParameters.DatabasePageSize);

			return instanceParameters;
		}
开发者ID:cocytus,项目名称:ravendb,代码行数:55,代码来源:StorageConfigurator.cs


示例9: InitColumDictionaries

	    public void InitColumDictionaries(JET_INSTANCE instance, string database)
	    {
	        using (var session = new Session(instance))
	        {
	            var dbid = JET_DBID.Nil;
	            try
	            {
	                Api.JetOpenDatabase(session, database, null, out dbid, OpenDatabaseGrbit.None);
	                using (var documents = new Table(session, dbid, "documents", OpenTableGrbit.None))
	                    DocumentsColumns = Api.GetColumnDictionary(session, documents);
					using (var lists = new Table(session, dbid, "lists", OpenTableGrbit.None))
						ListsColumns = Api.GetColumnDictionary(session, lists);
					using (var tasks = new Table(session, dbid, "tasks", OpenTableGrbit.None))
	                    TasksColumns = Api.GetColumnDictionary(session, tasks);
					using (var files = new Table(session, dbid, "files", OpenTableGrbit.None))
						FilesColumns = Api.GetColumnDictionary(session, files);
					using (var scheduledReductions = new Table(session, dbid, "scheduled_reductions", OpenTableGrbit.None))
						ScheduledReductionColumns = Api.GetColumnDictionary(session, scheduledReductions);
					using (var indexStats = new Table(session, dbid, "indexes_stats", OpenTableGrbit.None))
	                    IndexesStatsColumns = Api.GetColumnDictionary(session, indexStats);
					using (var indexStatsReduce = new Table(session, dbid, "indexes_stats_reduce", OpenTableGrbit.None))
						IndexesStatsReduceColumns = Api.GetColumnDictionary(session, indexStatsReduce);
					using (var indexEtags = new Table(session, dbid, "indexes_etag", OpenTableGrbit.None))
						IndexesEtagsColumns = Api.GetColumnDictionary(session, indexEtags);
					using (var mappedResults = new Table(session, dbid, "mapped_results", OpenTableGrbit.None))
	                    MappedResultsColumns = Api.GetColumnDictionary(session, mappedResults);
					using (var reduceResults = new Table(session, dbid, "reduce_results", OpenTableGrbit.None))
						ReduceResultsColumns = Api.GetColumnDictionary(session, reduceResults);
					using (var indexed_documents_references = new Table(session, dbid, "indexed_documents_references", OpenTableGrbit.None))
						IndexedDocumentsReferencesColumns = Api.GetColumnDictionary(session, tableid: indexed_documents_references);
					using (
	                    var documentsModifiedByTransactions = new Table(session, dbid, "documents_modified_by_transaction",
	                                                                    OpenTableGrbit.None))
	                    DocumentsModifiedByTransactionsColumns = Api.GetColumnDictionary(session,
	                                                                                                       documentsModifiedByTransactions);
	                using (var transactions = new Table(session, dbid, "transactions", OpenTableGrbit.None))
	                    TransactionsColumns = Api.GetColumnDictionary(session, transactions);
	                using (var identity = new Table(session, dbid, "identity_table", OpenTableGrbit.None))
	                    IdentityColumns = Api.GetColumnDictionary(session, identity);
	                using (var details = new Table(session, dbid, "details", OpenTableGrbit.None))
	                    DetailsColumns = Api.GetColumnDictionary(session, details);
	                using (var queue = new Table(session, dbid, "queue", OpenTableGrbit.None))
	                    QueueColumns = Api.GetColumnDictionary(session, queue);
					using (var reduceKeys = new Table(session, dbid, "reduce_keys_counts", OpenTableGrbit.None))
						ReduceKeysCountsColumns = Api.GetColumnDictionary(session, reduceKeys);
					using (var reduceKeys = new Table(session, dbid, "reduce_keys_status", OpenTableGrbit.None))
						ReduceKeysStatusColumns = Api.GetColumnDictionary(session, reduceKeys);
				}
	            finally
	            {
	                if (Equals(dbid, JET_DBID.Nil) == false)
	                    Api.JetCloseDatabase(session, dbid, CloseDatabaseGrbit.None);
	            }
	        }
	    }
开发者ID:nberardi,项目名称:ravendb,代码行数:55,代码来源:TableColumnsCache.cs


示例10: DocumentStorageActions

		public DocumentStorageActions(
			JET_INSTANCE instance,
			string database,
			TableColumnsCache tableColumnsCache,
			OrderedPartCollection<AbstractDocumentCodec> documentCodecs,
			IUuidGenerator uuidGenerator,
			IDocumentCacher cacher,
			EsentTransactionContext transactionContext,
			TransactionalStorage transactionalStorage)
		{
			this.tableColumnsCache = tableColumnsCache;
			this.documentCodecs = documentCodecs;
			this.uuidGenerator = uuidGenerator;
			this.cacher = cacher;
			this.transactionalStorage = transactionalStorage;
			this.transactionContext = transactionContext;

			try
			{
				if (transactionContext == null)
				{
					session = new Session(instance);
					transaction = new Transaction(session);
					sessionAndTransactionDisposer = () =>
					{
						if(transaction != null)
							transaction.Dispose();
						if(session != null)
							session.Dispose();
					};
				}
				else
				{
					session = transactionContext.Session;
					transaction = transactionContext.Transaction;
					var disposable = transactionContext.EnterSessionContext();
					sessionAndTransactionDisposer = disposable.Dispose;
				}
				Api.JetOpenDatabase(session, database, null, out dbid, OpenDatabaseGrbit.None);
			}
			catch (Exception ex)
			{
			    logger.WarnException("Error when trying to open a new DocumentStorageActions", ex);
			    try
			    {
			        Dispose();
			    }
			    catch (Exception e)
			    {
			        logger.WarnException("Error on dispose when the ctor threw an exception, resources may have leaked", e);
			    }
				throw;
			}
		}
开发者ID:925coder,项目名称:ravendb,代码行数:54,代码来源:General.cs


示例11: OpenSession

        private Session OpenSession(JET_INSTANCE instance, out Table table, out JET_COLUMNID primaryColumnId, out JET_COLUMNID secondaryColumnId)
        {
            var session = new Session(instance);
            Api.JetAttachDatabase2(session, _database, 0, AttachDatabaseGrbit.None);

            JET_DBID dbid;
            Api.JetOpenDatabase(session, _database, null, out dbid, OpenDatabaseGrbit.None);

            table = OpenSchema(session, dbid, out primaryColumnId, out secondaryColumnId);

            return session;
        }
开发者ID:WimVergouwe,项目名称:ravendb,代码行数:12,代码来源:EsentTest.cs


示例12: StorageActionsAccessor

		public StorageActionsAccessor(TableColumnsCache tableColumnsCache, JET_INSTANCE instance, string databaseName)
		{
			this.tableColumnsCache = tableColumnsCache;
			try
			{
				session = new Session(instance);
				transaction = new Transaction(session);
				Api.JetOpenDatabase(session, databaseName, null, out database, OpenDatabaseGrbit.None);
			}
			catch (Exception)
			{
				Dispose();
				throw;
			}
		}
开发者ID:hibernating-rhinos,项目名称:RavenFS,代码行数:15,代码来源:StorageActionsAccessor.cs


示例13: StorageActionsAccessor

		public StorageActionsAccessor(TableColumnsCache tableColumnsCache, JET_INSTANCE instance, string databaseName)
		{
            this.lastEtag = new Guid("ffffffff-ffff-ffff-ffff-ffffffffffff").TransformToValueForEsentSorting();
			this.tableColumnsCache = tableColumnsCache;
			try
			{
				session = new Session(instance);
				transaction = new Transaction(session);
				Api.JetOpenDatabase(session, databaseName, null, out database, OpenDatabaseGrbit.None);
			}
			catch (Exception)
			{
				Dispose();
				throw;
			}
		}
开发者ID:bbqchickenrobot,项目名称:ravendb,代码行数:16,代码来源:StorageActionsAccessor.cs


示例14: DocumentStorageActions

		public DocumentStorageActions(JET_INSTANCE instance, string database, TableColumnsCache tableColumnsCache, IEnumerable<AbstractDocumentCodec> documentCodecs)
		{
			this.tableColumnsCache = tableColumnsCache;
			this.documentCodecs = documentCodecs;
			try
			{
				session = new Session(instance);
				transaction = new Transaction(session);
				Api.JetOpenDatabase(session, database, null, out dbid, OpenDatabaseGrbit.None);
			}
			catch (Exception)
			{
				Dispose();
				throw;
			}
		}
开发者ID:jlundstocholm,项目名称:ravendb,代码行数:16,代码来源:General.cs


示例15: BackupOperation

 public BackupOperation(DocumentDatabase database, string src, string to)
 {
     instance = database.TransactionalStorage.Instance;
     this.database = database;
     this.to = to;
     this.src = src;
 }
开发者ID:kenegozi,项目名称:ravendb,代码行数:7,代码来源:BackupOperation.cs


示例16: Setup

        public void Setup()
        {
            this.directory = SetupHelper.CreateRandomDirectory();
            this.database = Path.Combine(this.directory, "database.edb");
            this.table = "table";
            this.instance = SetupHelper.CreateNewInstance(this.directory);

            Api.JetSetSystemParameter(this.instance, JET_SESID.Nil, JET_param.Recovery, 0, "off");
            Api.JetInit(ref this.instance);
            Api.JetBeginSession(this.instance, out this.sesid, String.Empty, String.Empty);
            Api.JetCreateDatabase(this.sesid, this.database, String.Empty, out this.dbid, CreateDatabaseGrbit.None);
            Api.JetBeginTransaction(this.sesid);
            Api.JetCreateTable(this.sesid, this.dbid, this.table, 0, 100, out this.tableid);

            JET_COLUMNID ignored;
            var columndef = new JET_COLUMNDEF { coltyp = JET_coltyp.Text, cp = JET_CP.Unicode };

            Api.JetAddColumn(this.sesid, this.tableid, "C1", columndef, null, 0, out ignored);
            Api.JetAddColumn(this.sesid, this.tableid, "C2", columndef, null, 0, out ignored);
            Api.JetAddColumn(this.sesid, this.tableid, "C3", columndef, null, 0, out ignored);

            Api.JetCreateIndex(this.sesid, this.tableid, "Primary", CreateIndexGrbit.IndexPrimary, "+C1\0\0", 5, 100);
            Api.JetCommitTransaction(this.sesid, CommitTransactionGrbit.LazyFlush);

            JET_INDEXCREATE[] indexcreates = new[]
            {
                new JET_INDEXCREATE { szIndexName = "Index2", cbKey = 5, szKey = "+C2\0\0" },
                new JET_INDEXCREATE { szIndexName = "Index3", cbKey = 5, szKey = "+C3\0\0", cbVarSegMac = 100 },
            };
            Api.JetCreateIndex2(this.sesid, this.tableid, indexcreates, indexcreates.Length);

            Api.JetCloseTable(this.sesid, this.tableid);
            Api.JetOpenTable(this.sesid, this.dbid, this.table, null, 0, OpenTableGrbit.None, out this.tableid);
        }
开发者ID:925coder,项目名称:ravendb,代码行数:34,代码来源:IndexInfoTests.cs


示例17: BackupOperation

        public BackupOperation(RavenFileSystem filesystem, string backupSourceDirectory, string backupDestinationDirectory, bool incrementalBackup,
	                           FileSystemDocument filesystemDocument)
            : base(filesystem, backupSourceDirectory, backupDestinationDirectory, incrementalBackup, filesystemDocument)
        {
            instance = ((TransactionalStorage)filesystem.Storage).Instance;
            backupConfigPath = Path.Combine(backupDestinationDirectory, "RavenDB.Backup");
	    }
开发者ID:kijanawoodard,项目名称:ravendb,代码行数:7,代码来源:BackupOperation.cs


示例18: Setup

        public void Setup()
        {
            this.directory = SetupHelper.CreateRandomDirectory();
            this.database = Path.Combine(this.directory, "database.edb");
            this.table = "table";
            this.instance = SetupHelper.CreateNewInstance(this.directory);

            Api.JetSetSystemParameter(this.instance, JET_SESID.Nil, JET_param.Recovery, 0, "off");
            Api.JetInit(ref this.instance);
            Api.JetBeginSession(this.instance, out this.sesid, String.Empty, String.Empty);
            Api.JetCreateDatabase(this.sesid, this.database, String.Empty, out this.dbid, CreateDatabaseGrbit.None);
            Api.JetBeginTransaction(this.sesid);
            Api.JetCreateTable(this.sesid, this.dbid, this.table, 0, 100, out this.tableid);

            var columndef = new JET_COLUMNDEF()
            {
                cp = JET_CP.Unicode,
                coltyp = JET_coltyp.LongText,
            };
            Api.JetAddColumn(this.sesid, this.tableid, "TestColumn", columndef, null, 0, out this.testColumnid);

            Api.JetCloseTable(this.sesid, this.tableid);
            Api.JetCommitTransaction(this.sesid, CommitTransactionGrbit.LazyFlush);
            Api.JetOpenTable(this.sesid, this.dbid, this.table, null, 0, OpenTableGrbit.None, out this.tableid);
        }
开发者ID:925coder,项目名称:ravendb,代码行数:25,代码来源:BasicDDLTests.cs


示例19: Setup

 public void Setup()
 {
     this.directory = SetupHelper.CreateRandomDirectory();
     this.instance = SetupHelper.CreateNewInstance(this.directory);
     Api.JetSetSystemParameter(this.instance, JET_SESID.Nil, JET_param.MaxTemporaryTables, 0, null);
     Api.JetInit(ref this.instance);
 }
开发者ID:j2jensen,项目名称:ravendb,代码行数:7,代码来源:InstanceMiscInfoTests.cs


示例20: BackupOperation

		public BackupOperation(DocumentDatabase database, string src, string to)
		{
			instance = ((TransactionalStorage)database.TransactionalStorage).Instance;
			this.database = database;
			this.to = to.ToFullPath();
			this.src = src.ToFullPath();
		}
开发者ID:wbinford,项目名称:ravendb,代码行数:7,代码来源:BackupOperation.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# JET_SESID类代码示例发布时间:2022-05-24
下一篇:
C# JET_DBID类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap