Skip to main content
Module

x/denodb/deps.ts>Bson.Binary

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Go to Latest
class Bson.Binary
import { Bson } from "https://deno.land/x/denodb@v1.0.40/deps.ts";
const { Binary } = Bson;

A class representation of the BSON Binary type.

Constructors

new
Binary(buffer?: string | BinarySequence, subType?: number)

Properties

_bsontype: "Binary"
buffer: Buffer
position: number
sub_type: number

Methods

inspect(): string
length(): number

the length of the binary sequence

put(byteValue:
| string
| number
| Uint8Array
| Buffer
| number[]
): void

Updates this binary with byte_value.

read(position: number, length: number): BinarySequence

Reads length bytes starting at position.

toJSON(): string
toString(format?: string): string
value(asRaw?: boolean): string | BinarySequence

Returns the value of this binary as a string.

write(sequence: string | BinarySequence, offset: number): void

Writes a buffer or string to the binary.

Static Properties

readonly
BUFFER_SIZE: number

Initial buffer default size

readonly
SUBTYPE_BYTE_ARRAY: number

Byte Array BSON type

readonly
SUBTYPE_COLUMN: number

Column BSON type

readonly
SUBTYPE_DEFAULT: number

Default BSON type

readonly
SUBTYPE_ENCRYPTED: number

Encrypted BSON type

readonly
SUBTYPE_FUNCTION: number

Function BSON type

readonly
SUBTYPE_MD5: number

MD5 BSON type

readonly
SUBTYPE_USER_DEFINED: number

User BSON type

readonly
SUBTYPE_UUID: number

UUID BSON type

readonly
SUBTYPE_UUID_OLD: number

Deprecated UUID BSON type @deprecated Please use SUBTYPE_UUID