metadata_table_private.h File Reference

#include "metadata_cell.h"
#include "metadata_cell_private.h"
Include dependency graph for metadata_table_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

G_BEGIN_DECLS int metadata_table_set_value (metadata_table *thiz, const guint idx, const sqlite3_value *value)
 Assign a value to a specific cell in a metadata_table This may move data already in the table to another memory location.
int metadata_table_set_cell (metadata_table *thiz, const guint idx, const metadata_cell *value)
 Assign a metadata_cell value to a specific cell in a metadata_table This may move data already in the table to another memory location.
int metadata_table_set_blob_static (metadata_table *thiz, const guint idx, const gchar *value, const guint len)
 Assign a blob to a specific cell in a sql table, assuming blob is static data BLOB = Binary Large OBject.

Function Documentation

int metadata_table_set_blob_static ( metadata_table thiz,
const guint  idx,
const gchar *  value,
const guint  len 
)

Assign a blob to a specific cell in a sql table, assuming blob is static data BLOB = Binary Large OBject.

---------------------------------------------------------------------------

Name : metadata_table_set_blob_static

Parameters:
thiz - the metadata_table
[in] idx - cell index (0 ...)
[in] value - binary value Note: The metadata_table will NOT release this memory block so caller must ensure the data stays available for as long as 'thiz' metadata_table exists or until a new value is assigned to the same cell.
[in] len - length of value in bytes
Returns:
ER_OK or error code

--------------------------------------------------------------------------

Definition at line 284 of file metadata_table.c.

References add_row_if_needed(), ER_INVALID_PARAMETER, LOGPRINTF, metadata_cell_set_blob_static(), and metadata_table::n_columns.

Referenced by set_annotation_impl().

00285 {
00286     LOGPRINTF("entry: thiz [%p] idx [%d] value [%p]", thiz, idx, value);
00287 
00288     g_return_val_if_fail( thiz,                 ER_INVALID_PARAMETER);
00289     g_return_val_if_fail((thiz->n_columns > 0), ER_INVALID_PARAMETER);
00290     g_return_val_if_fail( value,                ER_INVALID_PARAMETER);
00291 
00292     metadata_cell *cell = add_row_if_needed(thiz, idx);
00293     return metadata_cell_set_blob_static(cell, value, len);
00294 }

Here is the call graph for this function:

Here is the caller graph for this function:

int metadata_table_set_cell ( metadata_table thiz,
const guint  idx,
const metadata_cell value 
)

Assign a metadata_cell value to a specific cell in a metadata_table This may move data already in the table to another memory location.

---------------------------------------------------------------------------

Name : metadata_table_set_cell

Parameters:
thiz - the metadata_table
[in] idx - cell index (0 ...)
[in] value - metadata_cell whose value must be copied into the metadata_table
Returns:
ER_OK or error code

--------------------------------------------------------------------------

Definition at line 297 of file metadata_table.c.

References add_row_if_needed(), ER_INVALID_PARAMETER, LOGPRINTF, metadata_cell_copy_value(), and metadata_table::n_columns.

Referenced by rotate_keyval_table().

00298 {
00299     LOGPRINTF("entry: thiz [%p] idx [%d]", thiz, idx);
00300 
00301     g_return_val_if_fail( thiz,                 ER_INVALID_PARAMETER);
00302     g_return_val_if_fail((thiz->n_columns > 0), ER_INVALID_PARAMETER);
00303     g_return_val_if_fail( value,                ER_INVALID_PARAMETER);
00304 
00305     metadata_cell *cell = add_row_if_needed(thiz, idx);
00306     return metadata_cell_copy_value(cell, value);
00307 }

Here is the call graph for this function:

Here is the caller graph for this function:

G_BEGIN_DECLS int metadata_table_set_value ( metadata_table thiz,
const guint  idx,
const sqlite3_value *  value 
)

Assign a value to a specific cell in a metadata_table This may move data already in the table to another memory location.

File Name : metadata_table_private.h

Description: Extension of metadata_table.h for libermetadb internal use only. Copyright (C) 2008 iRex Technologies B.V. All rights reserved.---------------------------------------------------------------------------

Name : metadata_table_set_value

Parameters:
thiz - the metadata_table
[in] idx - cell index (0 ...)
[in] value - sqlite3_value to be assigned to this cell
Returns:
ER_OK or error code

--------------------------------------------------------------------------

Definition at line 222 of file metadata_table.c.

References add_row_if_needed(), ER_INVALID_PARAMETER, LOGPRINTF, metadata_cell_set_value(), and metadata_table::n_columns.

Referenced by execute_single_statement().

00223 {
00224     LOGPRINTF("entry: thiz [%p] idx [%d]", thiz, idx);
00225 
00226     g_return_val_if_fail( thiz,                 ER_INVALID_PARAMETER);
00227     g_return_val_if_fail((thiz->n_columns > 0), ER_INVALID_PARAMETER);
00228     
00229     metadata_cell *cell = add_row_if_needed(thiz, idx);
00230     return metadata_cell_set_value(cell, value);
00231 }

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  doxygen 1.6.2-20100208