shared3p_table_database.sc

shared3p_table_database.sc

Module for working with table databases that contain shared3p shares.

Functions:

tdbInsertRow

Insert a row into a table.

Detailed Description

This function can be used if all columns have the same type.

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

datasource

- name of the data source

table

- name of the table

values

- row to be inserted

Function Overloads

void tdbInsertRow(string datasource, string table, D T[[1]] values)

tdbReadColumn(index)

Read a column from a table.

Detailed Description

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

datasource

- name of the data source

table

- name of the table

index

- index of the column in the table

returns a vector with the values in the column

Function Overloads

D T tdbReadColumn(string datasource, string table, uint64 index)

tdbReadColumn(string)

Read a column from a table.

Detailed Description

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

datasource

- name of the data source

table

- name of the table

column

- name of the column

returns a vector with the values in the column

Function Overloads

D T tdbReadColumn(string datasource, string table, string column)

tdbTableCreate

Create a table where all columns have the same type.

Detailed Description

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

datasource

- name of the data source

table

- name of the table

vtype

- the type of this value will be the type of the columns

ncols

- number of columns in the created table

Function Overloads

void tdbTableCreate(string datasource, string table, D T[[N]] vtype, uint64 ncols)

tdbVmapAddType

Add a type to a vector in a vector map.

Detailed Description

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

id

- vector map id

paramname

- name of the vector to which the type is added

t

- a value of the type that’s added to the vector

Function Overloads

void tdbVmapAddType(uint64 id, string paramname, D T t)

tdbVmapAddValue(scalar)

Add a scalar value to a vector in a vector map.

Detailed Description

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

id

- vector map id

paramname

- name of the vector to which the value is added

value

- value to be added

Function Overloads

void tdbVmapAddValue(uint64 id, string paramname, D T value)

tdbVmapAddValue(vector)

Add a vector to a vector in a vector map.

Detailed Description

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

id

- vector map id

paramname

- name of the vector to which the argument vector is added

values

- vector to be added

Function Overloads

void tdbVmapAddValue(uint64 id, string paramname, D T[[1]] values)

tdbVmapAddVlenType

Add a variable length type to a vector in a vector map.

Detailed Description

This is used to create a table with a column that contains vectors with arbitrary length.

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

id

- vector map id

paramname

- name of the vector to which the type is added

t

- a value of the type that’s added to the vector

Function Overloads

void tdbVmapAddVlenType(uint64 id, string paramname, D T t)

tdbVmapAddVlenValue

Add a variable length vector to a vector in a vector map.

Detailed Description

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

id

- vector map id

paramname

- name of the vector to which the value is added

values

- vector to be added

Function Overloads

void tdbVmapAddVlenValue(uint64 id, string paramname, D T[[1]] values)

tdbVmapGetValue

Get a value from a vector in a vector map.

Detailed Description

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

id

- vector map id

paramname

- name of the vector from which to retrieve the value

index

- index of the value in the vector

returns the value in the vector at the specified index

Function Overloads

D T tdbVmapGetValue(uint64 id, string paramname, uint64 index)

tdbVmapGetVlenValue

Get a variable length value from a vector in a vector map.

Detailed Description

This function is used when the table column contains variable length vectors

D - shared3p protection domain

Supported types - bool / uint8 / uint16 / uint32 / uint / int8 / int16 / int32 / int / float32 / float64 xor_uint8 / xor_uint16 / xor_uint32 / xor_uint64

Parameters

id

- vector map id

paramname

- name of the vector from which to retrieve the value

index

- index of the value in the vector

Function Overloads

D T tdbVmapGetVlenValue(uint64 id, string paramname, uint64 index)