Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DataFormat

A DataFormat tells Antidote how JavaScript values should be stored in the database (in Sets, Registers, Maps). A DataFormat has to implement two functions jsToBinary and binaryToJs to convert between binary data and JavaScript values.

The default implementation is MsgpackDataFormat.

Hierarchy

  • DataFormat

Implemented by

Index

Methods

binaryToJs

  • binaryToJs(byteBuffer: ByteBuffer): any
  • Inverse of jsToBinary

    Parameters

    • byteBuffer: ByteBuffer

    Returns any

jsToBinary

  • jsToBinary(obj: any): ByteBuffer
  • Method to encode objects before they are written to the database

    Parameters

    • obj: any

    Returns ByteBuffer

Generated using TypeDoc