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

C# JET_TABLEID类代码示例

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

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



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

示例1: Setup

        public void Setup()
        {
            JET_TABLEID tableidTemp = new JET_TABLEID()
            {
                Value = (IntPtr)456,
            };
            this.managed = new JET_TABLECREATE()
            {
                szTableName = "table7",
                szTemplateTableName = "parentTable",
                ulPages = 7,
                ulDensity = 62,
                rgcolumncreate = null,
                cColumns = 0,
                rgindexcreate = null,
                cIndexes = 0,
                szCallback = "module!FunkyFunction",
                cbtyp = JET_cbtyp.AfterReplace,
                grbit = CreateTableColumnIndexGrbit.FixedDDL,
                pSeqSpacehints = null,
                pLVSpacehints = null,
                cbSeparateLV = 0x999,
                tableid = tableidTemp,
                cCreated = 2,
            };

            this.native = this.managed.GetNativeTableCreate2();
        }
开发者ID:j2jensen,项目名称:ravendb,代码行数:28,代码来源:TableCreate2Tests.cs


示例2: CreateDocumentsTable

        private static void CreateDocumentsTable(Session session, JET_TABLEID tableid)
        {
            JET_COLUMNID columnid;

            var guidColumn = new JET_COLUMNDEF
                                 {
                                     cbMax = 255,
                                     coltyp = JET_coltyp.Text,
                                     cp = JET_CP.Unicode,
                                     grbit = ColumndefGrbit.ColumnTagged
                                 };
            Api.JetAddColumn(session, tableid, "id", guidColumn, null, 0, out columnid);

            var collectionColumn = new JET_COLUMNDEF
                                       {
                                           cbMax = 1000,
                                           coltyp = JET_coltyp.Text,
                                           cp = JET_CP.Unicode,
                                           grbit = ColumndefGrbit.ColumnTagged
                                       };
            Api.JetAddColumn(session, tableid, "collection_name", collectionColumn, null, 0, out columnid);

            const string colectionIndexDef = "+collection_name\0\0";
            Api.JetCreateIndex(session, tableid, "by_collection_name", CreateIndexGrbit.None, colectionIndexDef, colectionIndexDef.Length, 100);

            var textColumn = new JET_COLUMNDEF
                                 {
                                     coltyp = JET_coltyp.LongText,
                                     grbit = ColumndefGrbit.ColumnTagged
                                 };
            Api.JetAddColumn(session, tableid, "data", textColumn, null, 0, out columnid);

            const string idIndexDef = "+id\0\0";
            Api.JetCreateIndex(session, tableid, "by_id", CreateIndexGrbit.IndexPrimary, idIndexDef, idIndexDef.Length, 100);
        }
开发者ID:AndyStewart,项目名称:docsharp,代码行数:35,代码来源:DatabaseSchema.cs


示例3: ConvertObjectlistFromNative

        public void ConvertObjectlistFromNative()
        {
            var tableid = new JET_TABLEID { Value = (IntPtr)0x1000 };
            var col1 = new JET_COLUMNID { Value = 1 };
            var col2 = new JET_COLUMNID { Value = 2 };
            var col3 = new JET_COLUMNID { Value = 3 };
            var col4 = new JET_COLUMNID { Value = 4 };
            var col5 = new JET_COLUMNID { Value = 5 };
            var col6 = new JET_COLUMNID { Value = 6 };

            var native = new NATIVE_OBJECTLIST()
            {
                tableid = tableid.Value,
                cRecord = 100,
                columnidobjectname = col1.Value,
                columnidobjtyp = col2.Value,
                columnidgrbit = col3.Value,
                columnidflags = col4.Value,
                columnidcRecord = col5.Value,
                columnidcPage = col6.Value,
            };

            var objectlist = new JET_OBJECTLIST();
            objectlist.SetFromNativeObjectlist(native);

            Assert.AreEqual(tableid, objectlist.tableid);
            Assert.AreEqual(100, objectlist.cRecord);
            Assert.AreEqual(col1, objectlist.columnidobjectname);
            Assert.AreEqual(col2, objectlist.columnidobjtyp);
            Assert.AreEqual(col3, objectlist.columnidgrbit);
            Assert.AreEqual(col4, objectlist.columnidflags);
            Assert.AreEqual(col5, objectlist.columnidcRecord);
            Assert.AreEqual(col6, objectlist.columnidcPage);
        }
开发者ID:ayende,项目名称:managed-esent,代码行数:34,代码来源:ObjectlistTests.cs


示例4: MakeKey

        /// <summary>
        /// Constructs a search key that may then be used by <see cref="JetSeek"/>
        /// and <see cref="JetSetIndexRange"/>.
        /// </summary>
        /// <param name="sesid">The session to use.</param>
        /// <param name="tableid">The cursor to create the key on.</param>
        /// <param name="data">Column data for the current key column of the current index.</param>
        /// <param name="encoding">The encoding used to convert the string.</param>
        /// <param name="grbit">Key options.</param>
        public static void MakeKey(JET_SESID sesid, JET_TABLEID tableid, string data, Encoding encoding, MakeKeyGrbit grbit)
        {
            CheckEncodingIsValid(encoding);

            if (null == data)
            {
                Api.JetMakeKey(sesid, tableid, null, 0, grbit);
            }
            else if (0 == data.Length)
            {
                Api.JetMakeKey(sesid, tableid, null, 0, grbit | MakeKeyGrbit.KeyDataZeroLength);
            }
            else if (Encoding.Unicode == encoding)
            {
                // Optimization for Unicode strings
                unsafe
                {
                    fixed (char* buffer = data)
                    {
                        Api.JetMakeKey(sesid, tableid, (IntPtr) buffer, data.Length * sizeof(char), grbit);
                    }
                }
            }
            else
            {
                byte[] bytes = encoding.GetBytes(data);
                Api.JetMakeKey(sesid, tableid, bytes, bytes.Length, grbit);
            }
        }
开发者ID:madmonkey,项目名称:managed-esent,代码行数:38,代码来源:MakeKeyHelpers.cs


示例5: DoCreateTable

        protected override void DoCreateTable(Session session, JET_TABLEID tableid)
        {
            JET_COLUMNID columnid;

            Api.JetAddColumn(session, tableid, "FileId", new JET_COLUMNDEF()
            {
                coltyp = JET_coltyp.Text,
                cp = JET_CP.Unicode,
                cbMax = 255,
                grbit = ColumndefGrbit.ColumnNotNULL
            }, null, 0, out columnid);

            Api.JetAddColumn(session, tableid, "Size", new JET_COLUMNDEF()
            {
                coltyp = Windows10Coltyp.UnsignedLongLong,
                grbit = ColumndefGrbit.ColumnNotNULL
            }, null, 0, out columnid);

            Api.JetAddColumn(session, tableid, "DTicks", new JET_COLUMNDEF()
            {
                coltyp = VistaColtyp.LongLong,
                grbit = ColumndefGrbit.ColumnNotNULL
            }, null, 0, out columnid);

            Api.JetAddColumn(session, tableid, "OTicks", new JET_COLUMNDEF()
            {
                coltyp = VistaColtyp.LongLong,
                grbit = ColumndefGrbit.ColumnNotNULL
            }, null, 0, out columnid);

            var indexDef = "+FileId\0\0";
            Api.JetCreateIndex(session, tableid, PrimaryIndexName, CreateIndexGrbit.IndexPrimary, indexDef, indexDef.Length, 100);
        }
开发者ID:Opiumtm,项目名称:DvachBrowser3,代码行数:33,代码来源:SizeCacheAdapter.cs


示例6: JetSetColumn

        /// <summary>
        /// The JetSetColumn function modifies a single column value in a modified record to be inserted or to
        /// update the current record. It can overwrite an existing value, add a new value to a sequence of
        /// values in a multi-valued column, remove a value from a sequence of values in a multi-valued column,
        /// or update all or part of a long value (a column of type <see cref="JET_coltyp.LongText"/>
        /// or <see cref="JET_coltyp.LongBinary"/>). 
        /// </summary>
        /// <remarks>
        /// This is an internal-only version of the API that takes a data buffer and an offset into the buffer.
        /// </remarks>
        /// <param name="sesid">The session which is performing the update.</param>
        /// <param name="tableid">The cursor to update. An update should be prepared.</param>
        /// <param name="columnid">The columnid to set.</param>
        /// <param name="data">The data to set.</param>
        /// <param name="dataSize">The size of data to set.</param>
        /// <param name="dataOffset">The offset in the data buffer to set data from.</param>
        /// <param name="grbit">SetColumn options.</param>
        /// <param name="setinfo">Used to specify itag or long-value offset.</param>
        /// <returns>A warning value.</returns>
        public static JET_wrn JetSetColumn(JET_SESID sesid, JET_TABLEID tableid, JET_COLUMNID columnid, byte[] data, int dataSize, int dataOffset, SetColumnGrbit grbit, JET_SETINFO setinfo)
        {
            if (dataOffset < 0
                || (null != data && 0 != dataSize && dataOffset >= data.Length)
                || (null == data && dataOffset != 0))
            {
                throw new ArgumentOutOfRangeException(
                    "dataOffset",
                    dataOffset,
                    "must be inside the data buffer");                    
            }

            if (null != data && dataSize > checked(data.Length - dataOffset) && (SetColumnGrbit.SizeLV != (grbit & SetColumnGrbit.SizeLV)))
            {
                throw new ArgumentOutOfRangeException(
                    "dataSize",
                    dataSize,
                    "cannot be greater than the length of the data (unless the SizeLV option is used)");
            }

            unsafe
            {
                fixed (byte* pointer = data)
                {
                    return Api.JetSetColumn(sesid, tableid, columnid, new IntPtr(pointer + dataOffset), dataSize, grbit, setinfo);
                }
            }
        }
开发者ID:925coder,项目名称:ravendb,代码行数:47,代码来源:InternalApi.cs


示例7: ColumnAccessor

 /// <summary>
 /// Initializes a new instance of the <see cref="ColumnAccessor" /> class.
 /// </summary>
 /// <param name="cursor">The cursor.</param>
 /// <param name="isamSession">The session.</param>
 /// <param name="tableid">The tableid.</param>
 /// <param name="grbit">The grbit.</param>
 internal ColumnAccessor(Cursor cursor, IsamSession isamSession, JET_TABLEID tableid, RetrieveColumnGrbit grbit)
 {
     this.cursor = cursor;
     this.isamSession = isamSession;
     this.tableid = tableid;
     this.grbit = grbit;
 }
开发者ID:subTee,项目名称:DSInternals,代码行数:14,代码来源:ColumnAccessor.cs


示例8: JetRetrieveColumn

        /// <summary>
        /// Retrieves a single column value from the current record. The record is that
        /// record associated with the index entry at the current position of the cursor.
        /// Alternatively, this function can retrieve a column from a record being created
        /// in the cursor copy buffer. This function can also retrieve column data from an
        /// index entry that references the current record. In addition to retrieving the
        /// actual column value, JetRetrieveColumn can also be used to retrieve the size
        /// of a column, before retrieving the column data itself so that application
        /// buffers can be sized appropriately.  
        /// </summary>
        /// <remarks>
        /// This is an internal method that takes a buffer offset as well as size.
        /// </remarks>
        /// <param name="sesid">The session to use.</param>
        /// <param name="tableid">The cursor to retrieve the column from.</param>
        /// <param name="columnid">The columnid to retrieve.</param>
        /// <param name="data">The data buffer to be retrieved into.</param>
        /// <param name="dataSize">The size of the data buffer.</param>
        /// <param name="dataOffset">Offset into the data buffer to read data into.</param>
        /// <param name="actualDataSize">Returns the actual size of the data buffer.</param>
        /// <param name="grbit">Retrieve column options.</param>
        /// <param name="retinfo">
        /// If pretinfo is give as NULL then the function behaves as though an itagSequence
        /// of 1 and an ibLongValue of 0 (zero) were given. This causes column retrieval to
        /// retrieve the first value of a multi-valued column, and to retrieve long data at
        /// offset 0 (zero).
        /// </param>
        /// <returns>An ESENT warning code.</returns>
        public static JET_wrn JetRetrieveColumn(JET_SESID sesid, JET_TABLEID tableid, JET_COLUMNID columnid, byte[] data, int dataSize, int dataOffset, out int actualDataSize, RetrieveColumnGrbit grbit, JET_RETINFO retinfo)
        {
            if (dataOffset < 0
                || (null != data && 0 != dataSize && dataOffset >= data.Length)
                || (null == data && dataOffset != 0))
            {
                throw new ArgumentOutOfRangeException(
                    "dataOffset",
                    dataOffset,
                    "must be inside the data buffer");
            }

            if ((null == data && dataSize > 0) || (null != data && dataSize > data.Length))
            {
                throw new ArgumentOutOfRangeException(
                    "dataSize",
                    dataSize,
                    "cannot be greater than the length of the data");
            }

            unsafe
            {
                fixed (byte* pointer = data)
                {
                    return Api.JetRetrieveColumn(
                        sesid, tableid, columnid, new IntPtr(pointer + dataOffset), dataSize, out actualDataSize, grbit, retinfo);
                }
            }
        }
开发者ID:j2jensen,项目名称:ravendb,代码行数:57,代码来源:InternalApi.cs


示例9: Add

        public bool Add(JET_SESID session, JET_TABLEID table, int level)
        {
            byte[] buffer;
            int actualBookmarkSize;

            var largeBuffer = IndexReaderBuffers.Buffers.TakeBuffer(bookmarkMost);
            try
            {
                Api.JetGetBookmark(session, table, largeBuffer,
                                   largeBuffer.Length, out actualBookmarkSize);

                buffer = new byte[actualBookmarkSize];
                Buffer.BlockCopy(largeBuffer, 0, buffer, 0, actualBookmarkSize);
            }
            finally
            {
                IndexReaderBuffers.Buffers.ReturnBuffer(largeBuffer);
            }
            var res = itemsToDelete.TryAdd(new Key(buffer, actualBookmarkSize));
            if (res)
            {
                itemsToDeletePerViewAndLevel.DecrementPerLevelCounters(level);
            }
            return res;
        }
开发者ID:j2jensen,项目名称:ravendb,代码行数:25,代码来源:OptimizedDeleter.cs


示例10: MakeKey

        /// <summary>
        /// Constructs a search key that may then be used by <see cref="JetSeek"/>
        /// and <see cref="JetSetIndexRange"/>.
        /// </summary>
        /// <param name="sesid">The session to use.</param>
        /// <param name="tableid">The cursor to create the key on.</param>
        /// <param name="data">Column data for the current key column of the current index.</param>
        /// <param name="encoding">The encoding used to convert the string.</param>
        /// <param name="grbit">Key options.</param>
        public static void MakeKey(JET_SESID sesid, JET_TABLEID tableid, string data, Encoding encoding, MakeKeyGrbit grbit)
        {
            CheckEncodingIsValid(encoding);

            if (null == data)
            {
                Api.JetMakeKey(sesid, tableid, null, 0, grbit);
            }
            else if (0 == data.Length)
            {
                Api.JetMakeKey(sesid, tableid, null, 0, grbit | MakeKeyGrbit.KeyDataZeroLength);
            }
            else if (Encoding.Unicode == encoding)
            {
                // Optimization for Unicode strings
                unsafe
                {
                    fixed (char* buffer = data)
                    {
                        Api.JetMakeKey(sesid, tableid, new IntPtr(buffer), checked(data.Length * sizeof(char)), grbit);
                    }
                }
            }
            else
            {
            #if MANAGEDESENT_ON_WSA
                // Encoding.GetBytes(char*, int, byte*, int) overload is missing in new Windows UI.
                // So we can't use the ColumnCache. We'll just use a different GetBytes() overload.
                byte[] buffer = encoding.GetBytes(data);
                Api.JetMakeKey(sesid, tableid, buffer, buffer.Length, grbit);
            #else
                // Convert the string using a cached column buffer. The column buffer is far larger
                // than the maximum key size, so any data truncation here won't matter.
                byte[] buffer = null;
                try
                {
                    buffer = Caches.ColumnCache.Allocate();
                    int dataSize;
                    unsafe
                    {
                        fixed (char* chars = data)
                        fixed (byte* bytes = buffer)
                        {
                            dataSize = encoding.GetBytes(chars, data.Length, bytes, buffer.Length);
                        }
                    }

                    JetMakeKey(sesid, tableid, buffer, dataSize, grbit);
                }
                finally
                {
                    if (buffer != null)
                    {
                        Caches.ColumnCache.Free(ref buffer);
                    }
                }
            #endif
            }
        }
开发者ID:nick121212,项目名称:xima_desktop3,代码行数:68,代码来源:MakeKeyHelpers.cs


示例11: JetCreateIndex4

 /// <summary>
 /// Creates indexes over data in an ESE database.
 /// </summary>
 /// <remarks>
 /// When creating multiple indexes (i.e. with numIndexCreates
 /// greater than 1) this method MUST be called
 /// outside of any transactions and with exclusive access to the
 /// table. The JET_TABLEID returned by "Api.JetCreateTable"
 /// will have exlusive access or the table can be opened for
 /// exclusive access by passing <see cref="OpenTableGrbit.DenyRead"/>
 /// to <see cref="Api.JetOpenTable"/>.
 /// </remarks>
 /// <param name="sesid">The session to use.</param>
 /// <param name="tableid">The table to create the index on.</param>
 /// <param name="indexcreates">Array of objects describing the indexes to be created.</param>
 /// <param name="numIndexCreates">Number of index description objects.</param>
 public static void JetCreateIndex4(
     JET_SESID sesid,
     JET_TABLEID tableid,
     JET_INDEXCREATE[] indexcreates,
     int numIndexCreates)
 {
     Api.Check(Api.Impl.JetCreateIndex4(sesid, tableid, indexcreates, numIndexCreates));
 }
开发者ID:subTee,项目名称:DSInternals,代码行数:24,代码来源:Windows8Api.cs


示例12: ColumnStream

 /// <summary>
 /// Initializes a new instance of the ColumnStream class.
 /// </summary>
 /// <param name="sesid">The session to use.</param>
 /// <param name="tableid">The cursor to use.</param>
 /// <param name="columnid">The columnid of the column to set/retrieve data from.</param>
 public ColumnStream(JET_SESID sesid, JET_TABLEID tableid, JET_COLUMNID columnid)
 {
     this.sesid = sesid;
     this.tableid = tableid;
     this.columnid = columnid;
     this.ibLongValue = 0;
     this.Itag = 1;
 }
开发者ID:madmonkey,项目名称:managed-esent,代码行数:14,代码来源:ColumnStream.cs


示例13: JetGetTableColumnInfo

 /// <summary>
 /// Retrieves information about a table column.
 /// </summary>
 /// <param name="sesid">The session to use.</param>
 /// <param name="tableid">The table containing the column.</param>
 /// <param name="columnid">The columnid of the column.</param>
 /// <param name="columnbase">Filled in with information about the column.</param>
 public static void JetGetTableColumnInfo(
     JET_SESID sesid,
     JET_TABLEID tableid,
     JET_COLUMNID columnid,
     out JET_COLUMNBASE columnbase)
 {
     Api.Check(Api.Impl.JetGetTableColumnInfo(sesid, tableid, columnid, out columnbase));
 }
开发者ID:nick121212,项目名称:xima_desktop3,代码行数:15,代码来源:VistaApi.cs


示例14: JetGetTableIndexInfo

 public static void JetGetTableIndexInfo(
     JET_SESID sesid,
     JET_TABLEID tableid,
     string indexname,
     out JET_INDEXLIST indexlist)
 {
     Api.JetGetTableIndexInfo(sesid, tableid, indexname, out indexlist, JET_IdxInfo.List);
 }
开发者ID:j2jensen,项目名称:ravendb,代码行数:8,代码来源:ObsoleteApi.cs


示例15: TempTableHandle

 /// <summary>
 /// Initializes a new instance of the <see cref="TempTableHandle"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="sesid">The sesid.</param>
 /// <param name="tableid">The tableid.</param>
 /// <param name="inInsertMode">if set to <c>true</c> [in insert mode].</param>
 internal TempTableHandle(string name, JET_SESID sesid, JET_TABLEID tableid, bool inInsertMode)
 {
     this.guid = Guid.NewGuid();
     this.name = name;
     this.sesid = sesid;
     this.tableid = tableid;
     this.inInsertMode = inInsertMode;
     this.cursorCount = 0;
 }
开发者ID:subTee,项目名称:DSInternals,代码行数:16,代码来源:TempTableHandle.cs


示例16: factory

		void ISchemaPart.ApplyToTable(Session session, JET_TABLEID table)
		{
			if (Api.GetTableColumns(session, table).All(ci => ci.Name != Name))
			{
				var factory = EsentHelper.GetColumnFactory(Member);
				JET_COLUMNID columnid;
				Api.JetAddColumn(session, table, Name, factory(), null, 0, out columnid);
			}
		}
开发者ID:eb2tech,项目名称:ManagedEsentMapper,代码行数:9,代码来源:MapPart.cs


示例17: MakeIndexRangeFromTableid

 /// <summary>
 /// Create a NATIVE_INDEXRANGE from a cursor.
 /// </summary>
 /// <param name="tableid">The cursor containing the index range.</param>
 /// <returns>A new NATIVE_INDEXRANGE on the cursor.</returns>
 public static NATIVE_INDEXRANGE MakeIndexRangeFromTableid(JET_TABLEID tableid)
 {
     var s = new NATIVE_INDEXRANGE
     {
         tableid = tableid.Value,
         grbit = (uint) IndexRangeGrbit.RecordInIndex,
     };
     s.cbStruct = (uint)Marshal.SizeOf(s);
     return s;
 }
开发者ID:Rationalle,项目名称:ravendb,代码行数:15,代码来源:jet_indexrange.cs


示例18:

		void ISchemaPart.ApplyToTable(Session session, JET_TABLEID table)
		{
			if (!Api.GetTableColumns(session, table).Any(ci => ci.Name == Name))
			{
				JET_COLUMNID columnid;
				Api.JetAddColumn(session, table, Name,
				                 new JET_COLUMNDEF {coltyp = JET_coltyp.Long, grbit = ColumndefGrbit.ColumnVersion}, null, 0,
				                 out columnid);
			}
		}
开发者ID:eb2tech,项目名称:ManagedEsentMapper,代码行数:10,代码来源:VersionPart.cs


示例19: SetColumn

        /// <summary>
        /// Modifies a single column value in a modified record to be inserted or to
        /// update the current record.
        /// </summary>
        /// <param name="sesid">The session to use.</param>
        /// <param name="tableid">The cursor to update. An update should be prepared.</param>
        /// <param name="columnid">The columnid to set.</param>
        /// <param name="data">The data to set.</param>
        /// <param name="encoding">The encoding used to convert the string.</param>
        /// <param name="grbit">SetColumn options.</param>
        public static void SetColumn(
            JET_SESID sesid, JET_TABLEID tableid, JET_COLUMNID columnid, string data, Encoding encoding, SetColumnGrbit grbit)
        {
            CheckEncodingIsValid(encoding);

            if (null == data)
            {
                JetSetColumn(sesid, tableid, columnid, null, 0, grbit, null);
            }
            else if (0 == data.Length)
            {
                JetSetColumn(sesid, tableid, columnid, null, 0, grbit | SetColumnGrbit.ZeroLength, null);
            }
            else if (Encoding.Unicode == encoding)
            {
                // Optimization for setting Unicode strings.
                unsafe
                {
                    fixed (char* buffer = data)
                    {
                        JetSetColumn(
                            sesid,
                            tableid,
                            columnid,
                            new IntPtr(buffer),
                            checked(data.Length * sizeof(char)),
                            grbit,
                            null);
                    }
                }
            }
            else if (encoding.GetMaxByteCount(data.Length) <= Caches.ColumnCache.BufferSize)
            {
                // The encoding output will fix in a cached buffer. Get one to avoid 
                // more memory allocations.
                byte[] buffer = Caches.ColumnCache.Allocate();
                unsafe
                {
                    fixed (char* chars = data)
                    fixed (byte* bytes = buffer)
                    {
                        int dataSize = encoding.GetBytes(chars, data.Length, bytes, buffer.Length);
                        JetSetColumn(sesid, tableid, columnid, new IntPtr(bytes), dataSize, grbit, null);
                    }                    
                }

                Caches.ColumnCache.Free(ref buffer);
            }
            else
            {
                byte[] bytes = encoding.GetBytes(data);
                JetSetColumn(sesid, tableid, columnid, bytes, bytes.Length, grbit, null);
            }
        }
开发者ID:925coder,项目名称:ravendb,代码行数:64,代码来源:SetColumnHelpers.cs


示例20: JetPrereadKeys

 /// <summary>
 /// If the records with the specified keys are not in the buffer cache
 /// then start asynchronous reads to bring the records into the database
 /// buffer cache.
 /// </summary>
 /// <param name="sesid">The session to use.</param>
 /// <param name="tableid">The table to issue the prereads against.</param>
 /// <param name="keys">
 /// The keys to preread. The keys must be sorted.
 /// </param>
 /// <param name="keyLengths">The lengths of the keys to preread.</param>
 /// <param name="keyCount">
 /// The maximum number of keys to preread.
 /// </param>
 /// <param name="keysPreread">
 /// Returns the number of keys to actually preread.
 /// </param>
 /// <param name="grbit">
 /// Preread options. Used to specify the direction of the preread.
 /// </param>
 public static void JetPrereadKeys(
     JET_SESID sesid,
     JET_TABLEID tableid,
     byte[][] keys,
     int[] keyLengths,
     int keyCount,
     out int keysPreread,
     PrereadKeysGrbit grbit)
 {
     JetPrereadKeys(sesid, tableid, keys, keyLengths, 0, keyCount, out keysPreread, grbit);
 }
开发者ID:925coder,项目名称:ravendb,代码行数:31,代码来源:Windows7Api.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# JET_param类代码示例发布时间:2022-05-24
下一篇:
C# JET_SESID类代码示例发布时间: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