FixedEntities

Git Source

State Variables

_tableId

ResourceId constant _tableId = ResourceId.wrap(0x746200000000000000000000000000004669786564456e746974696573000000);

_fieldLayout

FieldLayout constant _fieldLayout = FieldLayout.wrap(0x0020010120000000000000000000000000000000000000000000000000000000);

_keySchema

Schema constant _keySchema = Schema.wrap(0x002001005f000000000000000000000000000000000000000000000000000000);

_valueSchema

Schema constant _valueSchema = Schema.wrap(0x002001015fc10000000000000000000000000000000000000000000000000000);

Functions

getKeyNames

Get the table's key field names.

function getKeyNames() internal pure returns (string[] memory keyNames);

Returns

NameTypeDescription
keyNamesstring[]An array of strings with the names of key fields.

getFieldNames

Get the table's value field names.

function getFieldNames() internal pure returns (string[] memory fieldNames);

Returns

NameTypeDescription
fieldNamesstring[]An array of strings with the names of value fields.

register

Register the table with its config.

function register() internal;

_register

Register the table with its config.

function _register() internal;

getOutlet

Get outlet.

function getOutlet(bytes32 key) internal view returns (bytes32 outlet);

_getOutlet

Get outlet.

function _getOutlet(bytes32 key) internal view returns (bytes32 outlet);

setOutlet

Set outlet.

function setOutlet(bytes32 key, bytes32 outlet) internal;

_setOutlet

Set outlet.

function _setOutlet(bytes32 key, bytes32 outlet) internal;

getInlets

Get inlets.

function getInlets(bytes32 key) internal view returns (bytes32[] memory inlets);

_getInlets

Get inlets.

function _getInlets(bytes32 key) internal view returns (bytes32[] memory inlets);

setInlets

Set inlets.

function setInlets(bytes32 key, bytes32[] memory inlets) internal;

_setInlets

Set inlets.

function _setInlets(bytes32 key, bytes32[] memory inlets) internal;

lengthInlets

Get the length of inlets.

function lengthInlets(bytes32 key) internal view returns (uint256);

_lengthInlets

Get the length of inlets.

function _lengthInlets(bytes32 key) internal view returns (uint256);

getItemInlets

Get an item of inlets.

Reverts with Store_IndexOutOfBounds if _index is out of bounds for the array.

function getItemInlets(bytes32 key, uint256 _index) internal view returns (bytes32);

_getItemInlets

Get an item of inlets.

Reverts with Store_IndexOutOfBounds if _index is out of bounds for the array.

function _getItemInlets(bytes32 key, uint256 _index) internal view returns (bytes32);

pushInlets

Push an element to inlets.

function pushInlets(bytes32 key, bytes32 _element) internal;

_pushInlets

Push an element to inlets.

function _pushInlets(bytes32 key, bytes32 _element) internal;

popInlets

Pop an element from inlets.

function popInlets(bytes32 key) internal;

_popInlets

Pop an element from inlets.

function _popInlets(bytes32 key) internal;

updateInlets

Update an element of inlets at _index.

function updateInlets(bytes32 key, uint256 _index, bytes32 _element) internal;

_updateInlets

Update an element of inlets at _index.

function _updateInlets(bytes32 key, uint256 _index, bytes32 _element) internal;

get

Get the full data.

function get(bytes32 key) internal view returns (FixedEntitiesData memory _table);

_get

Get the full data.

function _get(bytes32 key) internal view returns (FixedEntitiesData memory _table);

set

Set the full data using individual values.

function set(bytes32 key, bytes32 outlet, bytes32[] memory inlets) internal;

_set

Set the full data using individual values.

function _set(bytes32 key, bytes32 outlet, bytes32[] memory inlets) internal;

set

Set the full data using the data struct.

function set(bytes32 key, FixedEntitiesData memory _table) internal;

_set

Set the full data using the data struct.

function _set(bytes32 key, FixedEntitiesData memory _table) internal;

decodeStatic

Decode the tightly packed blob of static data using this table's field layout.

function decodeStatic(bytes memory _blob) internal pure returns (bytes32 outlet);

decodeDynamic

Decode the tightly packed blob of dynamic data using the encoded lengths.

function decodeDynamic(EncodedLengths _encodedLengths, bytes memory _blob)
    internal
    pure
    returns (bytes32[] memory inlets);

decode

Decode the tightly packed blobs using this table's field layout.

function decode(bytes memory _staticData, EncodedLengths _encodedLengths, bytes memory _dynamicData)
    internal
    pure
    returns (FixedEntitiesData memory _table);

Parameters

NameTypeDescription
_staticDatabytesTightly packed static fields.
_encodedLengthsEncodedLengthsEncoded lengths of dynamic fields.
_dynamicDatabytesTightly packed dynamic fields.

deleteRecord

Delete all data for given keys.

function deleteRecord(bytes32 key) internal;

_deleteRecord

Delete all data for given keys.

function _deleteRecord(bytes32 key) internal;

encodeStatic

Tightly pack static (fixed length) data using this table's schema.

function encodeStatic(bytes32 outlet) internal pure returns (bytes memory);

Returns

NameTypeDescription
<none>bytesThe static data, encoded into a sequence of bytes.

encodeLengths

Tightly pack dynamic data lengths using this table's schema.

function encodeLengths(bytes32[] memory inlets) internal pure returns (EncodedLengths _encodedLengths);

Returns

NameTypeDescription
_encodedLengthsEncodedLengthsThe lengths of the dynamic fields (packed into a single bytes32 value).

encodeDynamic

Tightly pack dynamic (variable length) data using this table's schema.

function encodeDynamic(bytes32[] memory inlets) internal pure returns (bytes memory);

Returns

NameTypeDescription
<none>bytesThe dynamic data, encoded into a sequence of bytes.

encode

Encode all of a record's fields.

function encode(bytes32 outlet, bytes32[] memory inlets)
    internal
    pure
    returns (bytes memory, EncodedLengths, bytes memory);

Returns

NameTypeDescription
<none>bytesThe static (fixed length) data, encoded into a sequence of bytes.
<none>EncodedLengthsThe lengths of the dynamic fields (packed into a single bytes32 value).
<none>bytesThe dynamic (variable length) data, encoded into a sequence of bytes.

encodeKeyTuple

Encode keys as a bytes32 array using this table's field layout.

function encodeKeyTuple(bytes32 key) internal pure returns (bytes32[] memory);