Go to the source code of this file.
◆ BLOCK_TABLE
| #define BLOCK_TABLE "data/block.bin" |
◆ Block_deserialize()
Deserialize a Buffer into a block.
Caller must free memory in Block.cid.
- Parameters
-
| buffer | The Buffer you want to deserialize |
- Returns
- The Block that the Buffer represents
◆ Block_get_db()
| ListBlock Block_get_db |
( |
void | | ) |
|
Get the Block table from the database.
- Returns
- a List of Block's
◆ Block_set_db()
| void Block_set_db |
( |
ListBlock | blocks | ) |
|
Write the database with the List of Block's.
- Parameters
-
| blocks | the List of Block's that you want to overwrite the database with |
◆ DefList()
◆ insert_into_block()
| void insert_into_block |
( |
UUID * | fid, |
|
|
UUID * | nid, |
|
|
UUID * | cid, |
|
|
size_t * | seq ) |
INSERT into the Block table.
- Parameters
-
◆ ListBlock_deserialize()
| ListBlock ListBlock_deserialize |
( |
Buffer | buf | ) |
|
Deserialize a Buffer into a List of Block's.
Caller must free memory in Block.cid.
- Parameters
-
| buffer | The Buffer you want to deserialize |
- Returns
- The List of Block's that the Buffer represents
◆ ListBlock_serialize()
| Buffer ListBlock_serialize |
( |
ListBlock | list | ) |
|
Serialize a List of Block's into a Buffer.
Caller must free memory in Buffer.buf.
- Parameters
-
| list | the List of Block's that you want to serialize |
- Returns
- the Buffer that the ListBlock represents
◆ print_block()
| void print_block |
( |
Block | block | ) |
|
Print a Block's data as a tuple.
- Parameters
-
| block | the Block to be printed |
◆ select_from_block()
| ListBlock select_from_block |
( |
UUID * | bid, |
|
|
UUID * | fid, |
|
|
UUID * | nid, |
|
|
UUID * | cid, |
|
|
size_t * | seq ) |
SELECT from the Block table.
- Parameters
-
- Returns
- a ListBlock of the possible matches