Home Reference Source Repository
import Serializer from 'schema-mapper-serializer'
public class | source

Serializer

Base class for storage driver serializers

Method Summary

Public Methods
public

serialize(schema: Schema, item: Item): Object

Serialize an item to make it compatible with a storage engine.

Protected Methods
protected

serializeValue(value: *, column: Column): *

Serialize a single value

protected

sortKeys(item: Item): Item

Sort keys of an object.

Public Methods

public serialize(schema: Schema, item: Item): Object source

Serialize an item to make it compatible with a storage engine.

Params:

NameTypeAttributeDescription
schema Schema
item Item

Return:

Object

The serialized item

Protected Methods

protected serializeValue(value: *, column: Column): * source

Serialize a single value

Params:

NameTypeAttributeDescription
value *

The value to serialize

column Column

The column

Return:

*

The serialized value

protected sortKeys(item: Item): Item source

Sort keys of an object.

Params:

NameTypeAttributeDescription
item Item

Item to sort

Return:

Item

Sorted item