Examples of ISqlJetMemoryPointer


Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

     * (java.lang.Object[])
     */
    public boolean checkKey(Object... key) throws SqlJetException {
        if (eof())
            return false;
        final ISqlJetMemoryPointer keyRecord = SqlJetBtreeRecord.getRecord(btree.getDb().getOptions().getEncoding(),
                key).getRawRecord();
        return 0 == keyCompare(keyRecord, getRecord().getRawRecord());
    }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

     * (long, boolean, java.lang.Object[])
     */
    public void insert(long rowId, boolean append, Object... key) throws SqlJetException {
        lock();
        try {
            final ISqlJetMemoryPointer zKey = SqlJetBtreeRecord.getRecord(btree.getDb().getOptions().getEncoding(),
                    SqlJetUtility.addArrays(key, new Object[] { rowId })).getRawRecord();
            getCursor().insert(zKey, zKey.remaining(), SqlJetUtility.allocatePtr(0), 0, 0, append);
            clearRecordCache();
        } finally {
            unlock();
        }
    }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

     */
    public boolean delete(long rowId, Object... key) throws SqlJetException {
        lock();
        try {
            final ISqlJetBtreeRecord rec = SqlJetBtreeRecord.getRecord(btree.getDb().getOptions().getEncoding(), key);
            final ISqlJetMemoryPointer k = rec.getRawRecord();
            if (cursorMoveTo(k, false) < 0) {
                next();
            }
            do {
                final ISqlJetBtreeRecord record = getRecord();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

     */
    public int compareKey(Object[] key) throws SqlJetException {
        if (eof()) {
            return 1;
        }
        final ISqlJetMemoryPointer keyRecord = SqlJetBtreeRecord.getRecord(btree.getDb().getOptions().getEncoding(),
                key).getRawRecord();
        return keyCompare(keyRecord, getRecord().getRawRecord());
    }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

    private void doInsertRecord(long rowId, String typeField, String nameField, String tableField, int pageField,
            String sqlField) throws SqlJetException {
        final ISqlJetBtreeRecord record = SqlJetBtreeRecord.getRecord(getEncoding(), typeField, nameField, tableField,
                pageField, sqlField);
        final ISqlJetMemoryPointer pData = record.getRawRecord();
        insert(null, rowId, pData, pData.remaining(), 0, false);
    }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

    }

    public byte[] getBlobAsArray(final int field) throws SqlJetException {
        return (byte[]) db.runReadTransaction(new ISqlJetTransaction() {
            public Object run(SqlJetDb db) throws SqlJetException {
                ISqlJetMemoryPointer buffer = btreeTable.getBlob(field);
                return buffer != null ? SqlJetUtility.readByteBuffer(buffer) : null;
            }
        });
    }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

    }

    public InputStream getBlobAsStream(final int field) throws SqlJetException {
        return (InputStream) db.runReadTransaction(new ISqlJetTransaction() {
            public Object run(SqlJetDb db) throws SqlJetException {
                ISqlJetMemoryPointer buffer = btreeTable.getBlob(field);
                return buffer != null ? new ByteArrayInputStream(SqlJetUtility.readByteBuffer(buffer)) : null;
            }
        });
    }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

        try {
            initPage();
            nCell = this.nCell;

            for (i = 0; i < nCell; i++) {
                ISqlJetMemoryPointer pCell = findCell(i);

                ptrmapPutOvflPtr(pCell);

                if (!leaf) {
                    int childPgno = get4byte(pCell);
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

            initPage();
            nCell = this.nCell;

            for (i = 0; i < nCell; i++) {
                ISqlJetMemoryPointer pCell = findCell(i);
                if (s == SqlJetBtreeShared.PTRMAP_OVERFLOW1) {
                    SqlJetBtreeCellInfo info;
                    info = parseCellPtr(pCell);
                    if (info.iOverflow > 0) {
                        if (iFrom == get4byte(pCell, info.iOverflow)) {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer

     * @param sqlJetBtree
     * @param flags
     * @throws SqlJetException
     */
    void zeroPage(int flags) throws SqlJetException {
        ISqlJetMemoryPointer data = aData;
        byte hdr = hdrOffset;
        int first;

        assert (pDbPage.getPageNumber() == pgno);
        assert (pDbPage.getExtra() == this);
        assert (pDbPage.getData().getBuffer() == data.getBuffer());
        assert (pBt.mutex.held());

        SqlJetUtility.putUnsignedByte(data, hdr, (short) flags);
        first = hdr + 8 + 4 * ((flags & SqlJetMemPage.PTF_LEAF) == 0 ? 1 : 0);
        // SqlJetUtility.memset(data, hdr + 1, (byte) 0, 4);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.