Functions describing EXI sting tables operations.
More...
#include "procTypes.h"
#include "errorHandle.h"
Go to the source code of this file.
|
errorCode | createValueTable (ValueTable *valueTable) |
| Creates fresh empty ValueTable (value partition of EXI string table) This operation includes allocation of memory for DEFAULT_VALUE_ENTRIES_NUMBER number of value entries. More...
|
|
errorCode | addUriEntry (UriTable *uriTable, String uriStr, SmallIndex *uriEntryId) |
| Add new row into the URI string table. More...
|
|
errorCode | addLnEntry (LnTable *lnTable, String lnStr, Index *lnEntryId) |
| Add new row into the Local-Names string table. More...
|
|
errorCode | addValueEntry (EXIStream *strm, String valueStr, QNameID qnameID) |
| Add a new row into the Global ValueTable string table and Local value cross string table. More...
|
|
errorCode | addPfxEntry (PfxTable *pfxTable, String pfxStr, SmallIndex *pfxEntryId) |
| Add a new entry into the Prefix string table. More...
|
|
errorCode | createUriTableEntry (UriTable *uriTable, const String uri, int createPfx, const String pfx, const String *lnBase, Index lnSize) |
| Create an initial string table entry Create an initial string table entry, including URI, prefix and local name partitions. More...
|
|
errorCode | createUriTableEntries (UriTable *uriTable, boolean withSchema) |
| Create all string table partitions for a URI table It also inserts the default entries in the table. More...
|
|
boolean | lookupUri (UriTable *uriTable, String uriStr, SmallIndex *uriEntryId) |
| Search the URI table for a particular string value Implements full scan. More...
|
|
boolean | lookupLn (LnTable *lnTable, String lnStr, Index *lnEntryId) |
| Search the local names table for a particular string value Implements full scan RCC 20120201: Try to optimize? More...
|
|
boolean | lookupPfx (PfxTable *pfxTable, String pfxStr, SmallIndex *pfxEntryId) |
| Search the Prefix table for a particular string value Implements full scan. More...
|
|
boolean | lookupValue (ValueTable *valueTable, String valueStr, Index *valueEntryId) |
| Search the global Value table for a particular string value Implements full scan when opts->valuePartitionCapacity < DEFAULT_VALUE_ROWS_NUMBER Hash search otherwise. More...
|
|
- Date
- Sep 14, 2010
- Author
- Rumen Kyusakov
- Version
- 0.5
- [Revision] $Id: sTables.h 352 2014-11-25 16:37:24Z kjussakov $
Definition in file sTables.h.
#define DEFAULT_LN_ENTRIES_NUMBER 10 |
#define DEFAULT_PFX_ENTRIES_NUMBER 1 |
#define DEFAULT_URI_ENTRIES_NUMBER 4 |
#define DEFAULT_VALUE_ENTRIES_NUMBER 50 |
#define DEFAULT_VX_ENTRIES_NUMBER 10 |
#define GET_LN_P_URI_IDS |
( |
|
uriTable, |
|
|
|
uriId, |
|
|
|
lnId |
|
) |
| ((uriTable)->uri[uriId].lnTable.ln[lnId]) |
#define GET_LN_P_URI_P_QNAME |
( |
|
uriTable, |
|
|
|
qnameID |
|
) |
| ((uriTable)->uri[(qnameID)->uriId].lnTable.ln[(qnameID)->lnId]) |
#define GET_LN_P_URI_QNAME |
( |
|
uriTable, |
|
|
|
qnameID |
|
) |
| ((uriTable)->uri[(qnameID).uriId].lnTable.ln[(qnameID).lnId]) |
#define GET_LN_URI_IDS |
( |
|
uriTable, |
|
|
|
uriId, |
|
|
|
lnId |
|
) |
| ((uriTable).uri[uriId].lnTable.ln[lnId]) |
#define GET_LN_URI_P_QNAME |
( |
|
uriTable, |
|
|
|
qnameID |
|
) |
| ((uriTable).uri[(qnameID)->uriId].lnTable.ln[(qnameID)->lnId]) |
#define GET_LN_URI_QNAME |
( |
|
uriTable, |
|
|
|
qnameID |
|
) |
| ((uriTable).uri[(qnameID).uriId].lnTable.ln[(qnameID).lnId]) |
- Parameters
-
[out] | lnTable | Local Names string table partition |
[in] | lnStr | The string representing this local name. The String can be allocated on the stack. |
[out] | lnEntryId | the ID of the LnEntry added |
- Returns
- Error handling code
Definition at line 182 of file sTables.c.
- Parameters
-
[in,out] | pfxTable | Prefix string table partition |
[in] | pfxStr | The string representing this prefix. The String can be allocated on the stack. |
[out] | pfxEntryId | the ID of the PfxEntry added |
- Returns
- Error handling code
Definition at line 293 of file sTables.c.
- Parameters
-
[in,out] | uriTable | URI string table partition |
[in] | uriStr | The string representing this URI. The String can be allocated on the stack. |
[out] | uriEntryId | The ID of the UriEntry added |
- Returns
- Error handling code
Definition at line 161 of file sTables.c.
- Parameters
-
[in,out] | strm | EXI stream of bits |
[in] | valueStr | The string representing this global value. The String can be allocated on the stack. |
[in] | qnameID | The URI:ln QNameID |
- Returns
- Error handling code
Definition at line 200 of file sTables.c.
Because the behavior depends on the EXI options of the stream it is important that the options are initialized before calling this function.
- Parameters
-
[in,out] | uriTable | An empty UriTable; The memory must be already allocated for it |
[in] | withSchema | TRUE if there is schema for this stream; FALSE otherwise; Can be retrieved from strm->opts->schemaID != NULL |
- Returns
- Error handling code
Definition at line 332 of file sTables.c.
- Parameters
-
[in,out] | uriTable | URI string table partition |
[in] | uri | namespace string |
[in] | createPfx | TRUE if prefix table to be created, FALSE otherwise |
[in] | pfx | prefix string |
[in] | lnBase | Character array representing array of local names, or NULL if not present |
[in] | lnSize | Number of local names in array at lnBase |
- Returns
- Error handling code
Definition at line 307 of file sTables.c.
- Parameters
-
[in,out] | valueTable | ValueTable string table partition |
- Returns
- Error handling code
Definition at line 148 of file sTables.c.
- Parameters
-
[in] | lnTable | Local names table to be searched |
[in] | lnStr | The local name string searched for |
[out] | lnEntryId | if found, ID of the LnEntry with that string |
- Returns
- FALSE-not found, TRUE found
Definition at line 396 of file sTables.c.
- Parameters
-
[in] | pfxTable | Prefix table to be searched |
[in] | pfxStr | The string searched for |
[out] | pfxEntryId | if found, ID of the Prefix row with that string |
- Returns
- FALSE-not found, TRUE found
Definition at line 413 of file sTables.c.
- Parameters
-
[in] | uriTable | URI table to be searched |
[in] | uriStr | The string searched for |
[out] | uriEntryId | If found, ID of the UriEntry with that string |
- Returns
- FALSE-not found, TRUE found
Definition at line 378 of file sTables.c.
- Parameters
-
[in] | valueTable | Global Value table to be searched |
[in] | valueStr | The string searched for |
[out] | valueEntryId | if found, ID of the ValueEntry with that string |
- Returns
- FALSE-not found, TRUE found
Definition at line 454 of file sTables.c.