Class SqlJetVdbeSerialType

java.lang.Object
org.tmatesoft.sqljet.core.internal.vdbe.SqlJetVdbeSerialType

public class SqlJetVdbeSerialType extends java.lang.Object
Author:
TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    serialGet(ISqlJetMemoryPointer buf, int offset, int serial_type, SqlJetVdbeMem pMem)
     
    static int
    serialGet(ISqlJetMemoryPointer buf, int serial_type, SqlJetVdbeMem pMem)
    Deserialize the data blob pointed to by buf as serial type serial_type and store the result in pMem.
    static int
    serialPut(ISqlJetMemoryPointer buf, int nBuf, SqlJetVdbeMem pMem, int file_format)
    Write the serialized data blob for the value stored in pMem into buf.
    static int
    serialType(SqlJetVdbeMem pMem, int file_format)
     
    static int
    serialTypeLen(int serial_type)
    Return the length of the data corresponding to the supplied serial-type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SqlJetVdbeSerialType

      public SqlJetVdbeSerialType()
  • Method Details

    • serialTypeLen

      public static int serialTypeLen(int serial_type)
      Return the length of the data corresponding to the supplied serial-type.
    • serialGet

      public static int serialGet(ISqlJetMemoryPointer buf, int serial_type, SqlJetVdbeMem pMem)
      Deserialize the data blob pointed to by buf as serial type serial_type and store the result in pMem. Return the number of bytes read.
      Parameters:
      buf - Buffer to deserialize from
      serial_type - Serial type to deserialize
      pMem - Memory cell to write value into
      Returns:
    • serialGet

      public static int serialGet(ISqlJetMemoryPointer buf, int offset, int serial_type, SqlJetVdbeMem pMem)
    • serialType

      public static int serialType(SqlJetVdbeMem pMem, int file_format)
    • serialPut

      public static int serialPut(ISqlJetMemoryPointer buf, int nBuf, SqlJetVdbeMem pMem, int file_format)
      Write the serialized data blob for the value stored in pMem into buf. It is assumed that the caller has allocated sufficient space. Return the number of bytes written. nBuf is the amount of space left in buf[]. nBuf must always be large enough to hold the entire field. Except, if the field is a blob with a zero-filled tail, then buf[] might be just the right size to hold everything except for the zero-filled tail. If buf[] is only big enough to hold the non-zero prefix, then only write that prefix into buf[]. But if buf[] is large enough to hold both the prefix and the tail then write the prefix and set the tail to all zeros. Return the number of bytes actually written into buf[]. The number of bytes in the zero-filled tail is included in the return value only if those bytes were zeroed in buf[].