ajindex.c
Returns the default indexed name length for a named field
Synopsis
Prototype
ajuint ajBtreeFieldGetLenC (
const char* nametxt
);
Type | Name | Read/Write | Description |
const char* | nametxt | Input | Field name |
ajuint | | RETURN | Field name length |
Input
nametxt: | (Input) | Field name |
Returns
Description
Returns the default indexed name length for a named field
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the default indexed name length for a named field
Synopsis
Prototype
ajuint ajBtreeFieldGetLenS (
const AjPStr name
);
Type | Name | Read/Write | Description |
const AjPStr | name | Input | Field name |
ajuint | | RETURN | Field name length |
Input
Returns
Description
Returns the default indexed name length for a named field
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the default index file extension for a named field
Synopsis
Prototype
const AjPStr ajBtreeFieldGetExtensionC (
const char* nametxt
);
Type | Name | Read/Write | Description |
const char* | nametxt | Input | Field name |
const AjPStr | | RETURN | Filename extension |
Input
nametxt: | (Input) | Field name |
Returns
const AjPStr: | Filename extension |
Description
Returns the default index file extension for a named field
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the default index file extension for a named field
Synopsis
Prototype
const AjPStr ajBtreeFieldGetExtensionS (
const AjPStr name
);
Type | Name | Read/Write | Description |
const AjPStr | name | Input | Field name |
const AjPStr | | RETURN | Filename extension |
Input
Returns
const AjPStr: | Filename extension |
Description
Returns the default index file extension for a named field
See Also
See other functions in this section
Availability
In release 6.4.0
Returns whether a named field uses a secondary index
Synopsis
Prototype
AjBool ajBtreeFieldGetSecondaryC (
const char* nametxt
);
Type | Name | Read/Write | Description |
const char* | nametxt | Input | Field name |
AjBool | | RETURN | True for a secondary index where indexed terms treturn IDs
False for an ID index where terms return file positions. |
Input
nametxt: | (Input) | Field name |
Returns
AjBool: | True for a secondary index where indexed terms treturn IDs
False for an ID index where terms return file positions. |
Description
Returns whether a named field uses a secondary index
See Also
See other functions in this section
Availability
In release 6.4.0
Returns whether a named field uses a secondary index
Synopsis
Prototype
AjBool ajBtreeFieldGetSecondaryS (
const AjPStr name
);
Type | Name | Read/Write | Description |
const AjPStr | name | Input | Field name |
AjBool | | RETURN | True for a secondary index where indexed terms treturn IDs
False for an ID index where terms return file positions. |
Input
Returns
AjBool: | True for a secondary index where indexed terms treturn IDs
False for an ID index where terms return file positions. |
Description
Returns whether a named field uses a secondary index
See Also
See other functions in this section
Availability
In release 6.4.0
Open a b+tree index file and initialise a cache object
Synopsis
Prototype
AjPBtcache ajBtreeCacheNewC (
const char* filetxt,
const char* exttxt,
const char* idirtxt,
const char* mode,
AjBool compressed,
ajuint kwlimit,
ajuint pagesize,
ajuint cachesize,
ajulong pagecount,
ajuint order,
ajuint fill,
ajuint level,
ajuint sorder,
ajuint sfill,
ajulong count,
ajulong countall
);
Type | Name | Read/Write | Description |
const char* | filetxt | Input | name of file |
const char* | exttxt | Input | extension of file |
const char* | idirtxt | Input | index file directory |
const char* | mode | Input | opening mode |
AjBool | compressed | Input | Compressed index flag |
ajuint | kwlimit | Input | Max key size |
ajuint | pagesize | Input | pagesize |
ajuint | cachesize | Input | size of cache |
ajulong | pagecount | Input | page count |
ajuint | order | Input | Tree order |
ajuint | fill | Input | Number of entries per bucket |
ajuint | level | Input | level of tree |
ajuint | sorder | Input | order of secondary tree |
ajuint | sfill | Input | Number of entries per secondary bucket |
ajulong | count | Input | Number of entries in the index |
ajulong | countall | Input | Number of total entries in the index |
AjPBtcache | | RETURN | initialised disc block cache structure |
Input
filetxt: | (Input) | name of file |
exttxt: | (Input) | extension of file |
idirtxt: | (Input) | index file directory |
mode: | (Input) | opening mode |
compressed: | (Input) | Compressed index flag |
kwlimit: | (Input) | Max key size |
pagesize: | (Input) | pagesize |
cachesize: | (Input) | size of cache |
pagecount: | (Input) | page count |
order: | (Input) | Tree order |
fill: | (Input) | Number of entries per bucket |
level: | (Input) | level of tree |
sorder: | (Input) | order of secondary tree |
sfill: | (Input) | Number of entries per secondary bucket |
count: | (Input) | Number of entries in the index |
countall: | (Input) | Number of total entries in the index |
Returns
AjPBtcache: | initialised disc block cache structure |
Description
Open a b+tree index file and initialise a cache object
See Also
See other functions in this section
Availability
In release 6.4.0
Open a b+tree index file and initialise a cache object
Synopsis
Prototype
AjPBtcache ajBtreeCacheNewS (
const AjPStr file,
const AjPStr ext,
const AjPStr idir,
const char* mode,
AjBool compressed,
ajuint kwlimit,
ajuint pagesize,
ajuint cachesize,
ajulong pagecount,
ajuint order,
ajuint fill,
ajuint level,
ajuint sorder,
ajuint sfill,
ajulong count,
ajulong countall
);
Type | Name | Read/Write | Description |
const AjPStr | file | Input | name of file |
const AjPStr | ext | Input | extension of file |
const AjPStr | idir | Input | index file directory |
const char* | mode | Input | opening mode |
AjBool | compressed | Input | Compressed index flag |
ajuint | kwlimit | Input | Max key size |
ajuint | pagesize | Input | pagesize |
ajuint | cachesize | Input | size of cache |
ajulong | pagecount | Input | page count |
ajuint | order | Input | Tree order |
ajuint | fill | Input | Number of entries per bucket |
ajuint | level | Input | level of tree |
ajuint | sorder | Input | order of secondary tree |
ajuint | sfill | Input | Number of entries per secondary bucket |
ajulong | count | Input | Number of entries in the index |
ajulong | countall | Input | Number of total entries in the index |
AjPBtcache | | RETURN | initialised disc block cache structure |
Input
file: | (Input) | name of file |
ext: | (Input) | extension of file |
idir: | (Input) | index file directory |
mode: | (Input) | opening mode |
compressed: | (Input) | Compressed index flag |
kwlimit: | (Input) | Max key size |
pagesize: | (Input) | pagesize |
cachesize: | (Input) | size of cache |
pagecount: | (Input) | page count |
order: | (Input) | Tree order |
fill: | (Input) | Number of entries per bucket |
level: | (Input) | level of tree |
sorder: | (Input) | order of secondary tree |
sfill: | (Input) | Number of entries per secondary bucket |
count: | (Input) | Number of entries in the index |
countall: | (Input) | Number of total entries in the index |
Returns
AjPBtcache: | initialised disc block cache structure |
Description
Open a b+tree index file and initialise a cache object
See Also
See other functions in this section
Availability
In release 6.4.0
Open an existing b+tree index file and initialise a cache object
Synopsis
Prototype
AjPBtcache ajBtreeCacheNewReadC (
const char* filetxt,
const char* exttxt,
const char* idirtxt
);
Type | Name | Read/Write | Description |
const char* | filetxt | Input | name of file |
const char* | exttxt | Input | extension of file |
const char* | idirtxt | Input | index file directory |
AjPBtcache | | RETURN | initialised disc block cache structure |
Input
filetxt: | (Input) | name of file |
exttxt: | (Input) | extension of file |
idirtxt: | (Input) | index file directory |
Returns
AjPBtcache: | initialised disc block cache structure |
Description
Open an existing b+tree index file and initialise a cache object
See Also
See other functions in this section
Availability
In release 6.4.0
Open an existing b+tree index file and initialise a cache object
Synopsis
Prototype
AjPBtcache ajBtreeCacheNewReadS (
const AjPStr file,
const AjPStr ext,
const AjPStr idir
);
Type | Name | Read/Write | Description |
const AjPStr | file | Input | name of file |
const AjPStr | ext | Input | extension of file |
const AjPStr | idir | Input | index file directory |
AjPBtcache | | RETURN | initialised disc block cache structure |
Input
file: | (Input) | name of file |
ext: | (Input) | extension of file |
idir: | (Input) | index file directory |
Returns
AjPBtcache: | initialised disc block cache structure |
Description
Open an existing b+tree index file and initialise a cache object
See Also
See other functions in this section
Availability
In release 6.4.0
Open an existing b+tree index file for update and initialise a cache object
Synopsis
Prototype
AjPBtcache ajBtreeCacheNewUpdateC (
const char* filetxt,
const char* exttxt,
const char* idirtxt
);
Type | Name | Read/Write | Description |
const char* | filetxt | Input | name of file |
const char* | exttxt | Input | extension of file |
const char* | idirtxt | Input | index file directory |
AjPBtcache | | RETURN | initialised disc block cache structure |
Input
filetxt: | (Input) | name of file |
exttxt: | (Input) | extension of file |
idirtxt: | (Input) | index file directory |
Returns
AjPBtcache: | initialised disc block cache structure |
Description
Open an existing b+tree index file for update and initialise a cache object
See Also
See other functions in this section
Availability
In release 6.4.0
Open an existing b+tree index file for update and initialise a cache object
Synopsis
Prototype
AjPBtcache ajBtreeCacheNewUpdateS (
const AjPStr file,
const AjPStr ext,
const AjPStr idir
);
Type | Name | Read/Write | Description |
const AjPStr | file | Input | name of file |
const AjPStr | ext | Input | extension of file |
const AjPStr | idir | Input | index file directory |
AjPBtcache | | RETURN | initialised disc block cache structure |
Input
file: | (Input) | name of file |
ext: | (Input) | extension of file |
idir: | (Input) | index file directory |
Returns
AjPBtcache: | initialised disc block cache structure |
Description
Open an existing b+tree index file for update and initialise a cache object
See Also
See other functions in this section
Availability
In release 6.4.0
Close a b+tree cache
Synopsis
Prototype
ajulong ajBtreeCacheDel (
AjPBtcache* Pthis
);
Type | Name | Read/Write | Description |
AjPBtcache* | Pthis | Output | Cache object |
ajulong | | RETURN | Index file size |
Output
Pthis: | (Output) | Cache object |
Returns
Description
Close a b+tree cache
See Also
See other functions in this section
Availability
In release 6.4.0
Test whether a cache is a secondary index
Synopsis
Prototype
AjBool ajBtreeCacheIsSecondary (
const AjPBtcache thys
);
Type | Name | Read/Write | Description |
const AjPBtcache | thys | Input | Cache object |
AjBool | | RETURN | True if cache is secondary |
Input
Returns
AjBool: | True if cache is secondary |
Description
Test whether a cache is a secondary index
See Also
See other functions in this section
Availability
In release 6.4.0
Cache statistics for writing a new index
Synopsis
Prototype
void ajBtreeCacheStatsOut (
AjPFile outf,
const AjPBtcache cache,
ajulong* Pcache,
ajulong* Preads,
ajulong* Pwrites,
ajulong* Psize
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | output file file |
const AjPBtcache | cache | Input | cache object |
ajulong* | Pcache | Modify | Number of cache reads to date |
ajulong* | Preads | Modify | Number of disk reads to date |
ajulong* | Pwrites | Modify | Number of disk writes to date |
ajulong* | Psize | Modify | Number of cache pages to date |
void | | RETURN | |
Input
cache: | (Input) | cache object |
Input & Output
outf: | (Modify) | output file file |
Pcache: | (Modify) | Number of cache reads to date |
Preads: | (Modify) | Number of disk reads to date |
Pwrites: | (Modify) | Number of disk writes to date |
Psize: | (Modify) | Number of cache pages to date |
Returns
Description
Cache statistics for writing a new index
See Also
See other functions in this section
Availability
In release 6.4.0
Get a pointer to a disc cache page
Synopsis
Prototype
AjPBtpage ajBtreeCacheRead (
AjPBtcache cache,
ajulong pagepos
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
ajulong | pagepos | Input | page number |
AjPBtpage | | RETURN | disc cache page pointer |
Input
pagepos: | (Input) | page number |
Output
Returns
AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a disc cache page
See Also
See other functions in this section
Availability
In release 6.4.0
Sync all dirty cache pages
Synopsis
Prototype
void ajBtreeCacheSync (
AjPBtcache cache,
ajulong rootpage
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
ajulong | rootpage | Input | root page |
void | | RETURN | |
Input
rootpage: | (Input) | root page |
Input & Output
Returns
Description
Sync all dirty cache pages
See Also
See other functions in this section
Availability
In release 6.4.0
Reset locked pages to dirty and relock the specified secondary root page.
Pages will be written only when they are removed from the cache.
This function clears all locks.
The caller must relock the root page (zero) if needed.
Synopsis
Prototype
void ajBtreeCacheRootSync (
AjPBtcache cache,
ajulong rootpage
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
ajulong | rootpage | Input | secondary (locked) root page |
void | | RETURN | |
Input
rootpage: | (Input) | secondary (locked) root page |
Input & Output
Returns
Description
Reset locked pages to dirty and relock the specified secondary root page.
Pages will be written only when they are removed from the cache.
This function clears all locks.
The caller must relock the root page (zero) if needed.
See Also
See other functions in this section
Availability
In release 6.4.0
Get a pointer to a disc cache page for writing
Synopsis
Prototype
AjPBtpage ajBtreeCacheWrite (
AjPBtcache cache,
ajulong pagepos
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
ajulong | pagepos | Input | page number |
AjPBtpage | | RETURN | disc cache page pointer |
Input
pagepos: | (Input) | page number |
Output
Returns
AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a disc cache page for writing
See Also
See other functions in this section
Availability
In release 6.4.0
Get a pointer to a disc cache page for writing
Synopsis
Prototype
AjPBtpage ajBtreeCacheWriteBucket (
AjPBtcache cache,
ajulong pagepos
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
ajulong | pagepos | Input | page number |
AjPBtpage | | RETURN | disc cache page pointer |
Input
pagepos: | (Input) | page number |
Output
Returns
AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a disc cache page for writing
See Also
See other functions in this section
Availability
In release 6.4.0
Get a pointer to a disc cache page for writing a node
Synopsis
Prototype
AjPBtpage ajBtreeCacheWriteNode (
AjPBtcache cache,
ajulong pagepos
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
ajulong | pagepos | Input | page number |
AjPBtpage | | RETURN | disc cache page pointer |
Input
pagepos: | (Input) | page number |
Output
Returns
AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a disc cache page for writing a node
See Also
See other functions in this section
Availability
In release 6.4.0
Get a pointer to a new disc cache page for writing a bucket.
Clears the page.
Synopsis
Prototype
AjPBtpage ajBtreeCacheWriteBucketnew (
AjPBtcache cache
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
AjPBtpage | | RETURN | disc cache page pointer |
Output
Returns
AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a new disc cache page for writing a bucket.
Clears the page.
See Also
See other functions in this section
Availability
In release 6.4.0
Get a pointer to a new disc cache page for writing a node
Clears the page and sets the block number.
Synopsis
Prototype
AjPBtpage ajBtreeCacheWriteNodenew (
AjPBtcache cache
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
AjPBtpage | | RETURN | disc cache page pointer |
Output
Returns
AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a new disc cache page for writing a node
Clears the page and sets the block number.
See Also
See other functions in this section
Availability
In release 6.4.0
Get a pointer to a new disc cache page for writing an overflow node
Clears the page and sets the block number and nodetype
Synopsis
Prototype
AjPBtpage ajBtreeCacheWriteOverflownew (
AjPBtcache cache
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
AjPBtpage | | RETURN | disc cache page pointer |
Output
Returns
AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a new disc cache page for writing an overflow node
Clears the page and sets the block number and nodetype
See Also
See other functions in this section
Availability
In release 6.4.0
Create and write an empty root node. Set it as root, write it to
disc and then lock the page in the disc cache.
The root node is at block 0L
Synopsis
Prototype
void ajBtreeCreateRootNode (
AjPBtcache cache,
ajulong rootpage
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
ajulong | rootpage | Input | root block |
void | | RETURN | |
Input
rootpage: | (Input) | root block |
Output
Returns
Description
Create and write an empty root node. Set it as root, write it to
disc and then lock the page in the disc cache.
The root node is at block 0L
See Also
See other functions in this section
Availability
In release 6.4.0
Find the node that should contain a new key for insertion
Synopsis
Prototype
AjPBtpage ajBtreeFindInsert (
AjPBtcache cache,
const AjPStr key
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key to search for |
AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
key: | (Input) | key to search for |
Input & Output
Returns
AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a new key for insertion
See Also
See other functions in this section
Availability
In release 6.4.0
Constructor for index bucket ID information
Synopsis
Prototype
AjPBtId ajBtreeIdNew (
void
);
Type | Name | Read/Write | Description |
AjPBtId | | RETURN | Index ID object |
Returns
Description
Constructor for index bucket ID information
See Also
See other functions in this section
Availability
In release 6.4.0
Destructor for index bucket ID information
Synopsis
Prototype
void ajBtreeIdDel (
AjPBtId* thys
);
Type | Name | Read/Write | Description |
AjPBtId* | thys | Output | index ID object |
void | | RETURN | |
Output
thys: | (Output) | index ID object |
Returns
Description
Destructor for index bucket ID information
See Also
See other functions in this section
Availability
In release 6.4.0
Destructor for index bucket ID information
Synopsis
Prototype
void ajBtreeIdDelVoid (
void** voidarg
);
Type | Name | Read/Write | Description |
void** | voidarg | Output | Index ID object, passed as void for use by
list and table destructors. |
void | | RETURN | |
Output
voidarg: | (Output) | Index ID object, passed as void for use by
list and table destructors. |
Returns
Description
Destructor for index bucket ID information
See Also
See other functions in this section
Availability
In release 6.4.0
Read the leaves of a secondary keywords tree
Synopsis
Prototype
void ajBtreeDumpKeywords (
AjPBtcache cache,
ajuint dmin,
ajuint dmax,
AjPFile outf
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
ajuint | dmin | Input | minimum number of times the key should appear |
ajuint | dmax | Input | maximum number of times the key should appear |
AjPFile | outf | Modify | output file |
void | | RETURN | |
Input
dmin: | (Input) | minimum number of times the key should appear |
dmax: | (Input) | maximum number of times the key should appear |
Input & Output
cache: | (Modify) | cache |
outf: | (Modify) | output file |
Returns
Description
Read the leaves of a secondary keywords tree
See Also
See other functions in this section
Availability
In release 6.4.0
Insert an ID structure into the tree
Synopsis
Prototype
void ajBtreeInsertId (
AjPBtcache cache,
const AjPBtId id
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPBtId | id | Input | Id object |
void | | RETURN | pointer to a page |
Input
Input & Output
Returns
Description
Insert an ID structure into the tree
See Also
See other functions in this section
Availability
In release 6.4.0
Get an ID structure from a leaf node given a key
Synopsis
Prototype
AjPBtId ajBtreeIdFromKey (
AjPBtcache cache,
const AjPStr key
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key |
AjPBtId | | RETURN | pointer to an ID structure or NULL if not found |
Input
Input & Output
Returns
AjPBtId: | pointer to an ID structure or NULL if not found |
Description
Get an ID structure from a leaf node given a key
See Also
See other functions in this section
Availability
In release 6.4.0
Write B+ tree parameters to file
Synopsis
Prototype
void ajBtreeWriteParamsC (
const AjPBtcache cache,
const char* fntxt,
const char* exttxt,
const char* idirtxt
);
Type | Name | Read/Write | Description |
const AjPBtcache | cache | Input | cache |
const char* | fntxt | Input | file name |
const char* | exttxt | Input | index file extension name |
const char* | idirtxt | Input | index file directory |
void | | RETURN | |
Input
cache: | (Input) | cache |
fntxt: | (Input) | file name |
exttxt: | (Input) | index file extension name |
idirtxt: | (Input) | index file directory |
Returns
Description
Write B+ tree parameters to file
See Also
See other functions in this section
Availability
In release 6.4.0
Write B+ tree parameters to file
Synopsis
Prototype
void ajBtreeWriteParamsS (
const AjPBtcache cache,
const AjPStr fn,
const AjPStr ext,
const AjPStr idir
);
Type | Name | Read/Write | Description |
const AjPBtcache | cache | Input | cache |
const AjPStr | fn | Input | file name |
const AjPStr | ext | Input | index file extension name |
const AjPStr | idir | Input | index file directory |
void | | RETURN | |
Input
cache: | (Input) | cache |
fn: | (Input) | file name |
ext: | (Input) | index file extension name |
idir: | (Input) | index file directory |
Returns
Description
Write B+ tree parameters to file
See Also
See other functions in this section
Availability
In release 6.4.0
Read B+ tree parameters from file
Synopsis
Prototype
AjBool ajBtreeReadParamsC (
const char* filetxt,
const char* exttxt,
const char* idirtxt,
AjBool* secondary,
AjBool* compressed,
ajuint* kwlimit,
ajuint* pagesize,
ajuint* cachesize,
ajulong* pagecount,
ajuint* order,
ajuint* nperbucket,
ajuint* level,
ajuint* sorder,
ajuint* snperbucket,
ajulong* count,
ajulong* countall
);
Type | Name | Read/Write | Description |
const char* | filetxt | Input | file |
const char* | exttxt | Input | file extension |
const char* | idirtxt | Input | index directory |
AjBool* | secondary | Output | true for a secondary index |
AjBool* | compressed | Output | true for a compressed index |
ajuint* | kwlimit | Output | maximum length of a keyword |
ajuint* | pagesize | Output | size of pages |
ajuint* | cachesize | Output | cachesize |
ajulong* | pagecount | Output | page count |
ajuint* | order | Output | tree order |
ajuint* | nperbucket | Output | bucket fill |
ajuint* | level | Output | depth of tree (0 = root leaf) |
ajuint* | sorder | Output | secondary tree order |
ajuint* | snperbucket | Output | secondary bucket fill |
ajulong* | count | Output | number of primary keywords in the index |
ajulong* | countall | Output | number of total keywords in the index |
AjBool | | RETURN | True on success |
Input
filetxt: | (Input) | file |
exttxt: | (Input) | file extension |
idirtxt: | (Input) | index directory |
Output
secondary: | (Output) | true for a secondary index |
compressed: | (Output) | true for a compressed index |
kwlimit: | (Output) | maximum length of a keyword |
pagesize: | (Output) | size of pages |
cachesize: | (Output) | cachesize |
pagecount: | (Output) | page count |
order: | (Output) | tree order |
nperbucket: | (Output) | bucket fill |
level: | (Output) | depth of tree (0 = root leaf) |
sorder: | (Output) | secondary tree order |
snperbucket: | (Output) | secondary bucket fill |
count: | (Output) | number of primary keywords in the index |
countall: | (Output) | number of total keywords in the index |
Returns
Description
Read B+ tree parameters from file
See Also
See other functions in this section
Availability
In release 6.4.0
Read B+ tree parameters from file
Synopsis
Prototype
AjBool ajBtreeReadParamsS (
const AjPStr file,
const AjPStr ext,
const AjPStr idir,
AjBool* secondary,
AjBool* compressed,
ajuint* kwlimit,
ajuint* pagesize,
ajuint* cachesize,
ajulong* pagecount,
ajuint* order,
ajuint* nperbucket,
ajuint* level,
ajuint* sorder,
ajuint* snperbucket,
ajulong* count,
ajulong* countall
);
Type | Name | Read/Write | Description |
const AjPStr | file | Input | file |
const AjPStr | ext | Input | file extension |
const AjPStr | idir | Input | index directory |
AjBool* | secondary | Output | true for a secondary index |
AjBool* | compressed | Output | true for a compressed index |
ajuint* | kwlimit | Output | maximum length of a keyword |
ajuint* | pagesize | Output | size of pages |
ajuint* | cachesize | Output | cachesize |
ajulong* | pagecount | Output | page count |
ajuint* | order | Output | tree order |
ajuint* | nperbucket | Output | bucket fill |
ajuint* | level | Output | depth of tree (0 = root leaf) |
ajuint* | sorder | Output | secondary tree order |
ajuint* | snperbucket | Output | secondary bucket fill |
ajulong* | count | Output | number of primary keywords in the index |
ajulong* | countall | Output | number of total keywords in the index |
AjBool | | RETURN | True on success |
Input
file: | (Input) | file |
ext: | (Input) | file extension |
idir: | (Input) | index directory |
Output
secondary: | (Output) | true for a secondary index |
compressed: | (Output) | true for a compressed index |
kwlimit: | (Output) | maximum length of a keyword |
pagesize: | (Output) | size of pages |
cachesize: | (Output) | cachesize |
pagecount: | (Output) | page count |
order: | (Output) | tree order |
nperbucket: | (Output) | bucket fill |
level: | (Output) | depth of tree (0 = root leaf) |
sorder: | (Output) | secondary tree order |
snperbucket: | (Output) | secondary bucket fill |
count: | (Output) | number of primary keywords in the index |
countall: | (Output) | number of total keywords in the index |
Returns
Description
Read B+ tree parameters from file
See Also
See other functions in this section
Availability
In release 6.4.0
Construct a wildcard search object
Synopsis
Prototype
AjPBtWild ajBtreeWildNew (
AjPBtcache cache,
const AjPStr wild
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | wild | Input | wildcard id prefix (without asterisk) |
AjPBtWild | | RETURN | b+ tree wildcard object |
Input
wild: | (Input) | wildcard id prefix (without asterisk) |
Input & Output
Returns
AjPBtWild: | b+ tree wildcard object |
Description
Construct a wildcard search object
See Also
See other functions in this section
Availability
In release 6.4.0
Destroy a wildcard search object
Synopsis
Prototype
void ajBtreeWildDel (
AjPBtWild* Pthis
);
Type | Name | Read/Write | Description |
AjPBtWild* | Pthis | Modify | b+ tree wildcard structure |
void | | RETURN | |
Input & Output
Pthis: | (Modify) | b+ tree wildcard structure |
Returns
Description
Destroy a wildcard search object
See Also
See other functions in this section
Availability
In release 6.4.0
Construct a wildcard keyword search object
Synopsis
Prototype
AjPBtKeyWild ajBtreeKeyWildNew (
AjPBtcache cache,
const AjPStr wild
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | wild | Input | wildcard keyword prefix (without asterisk) |
AjPBtKeyWild | | RETURN | b+ tree wildcard object |
Input
wild: | (Input) | wildcard keyword prefix (without asterisk) |
Input & Output
Returns
AjPBtKeyWild: | b+ tree wildcard object |
Description
Construct a wildcard keyword search object
See Also
See other functions in this section
Availability
In release 6.4.0
Destroy a wildcard keyword search object
Synopsis
Prototype
void ajBtreeKeyWildDel (
AjPBtKeyWild* Pthis
);
Type | Name | Read/Write | Description |
AjPBtKeyWild* | Pthis | Modify | b+ tree wildcard keyword structure |
void | | RETURN | |
Input & Output
Pthis: | (Modify) | b+ tree wildcard keyword structure |
Returns
Description
Destroy a wildcard keyword search object
See Also
See other functions in this section
Availability
In release 6.4.0
Find the node that should contain a key (wild)
Synopsis
Prototype
AjPBtpage ajBtreeFindInsertW (
AjPBtcache cache,
const AjPStr key
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key to search for |
AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
key: | (Input) | key to search for |
Input & Output
Returns
AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a key (wild)
See Also
See other functions in this section
Availability
In release 6.4.0
Wildcard retrieval of entries
Synopsis
Prototype
AjPBtId ajBtreeIdFromKeyW (
AjPBtcache cache,
AjPBtWild wild
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
AjPBtWild | wild | Modify | Wildcard |
AjPBtId | | RETURN | next matching Id or NULL |
Input & Output
cache: | (Modify) | cache |
wild: | (Modify) | Wildcard |
Returns
AjPBtId: | next matching Id or NULL |
Description
Wildcard retrieval of entries
See Also
See other functions in this section
Availability
In release 6.4.0
Wildcard retrieval of entries
Synopsis
Prototype
void ajBtreeListFromKeyW (
AjPBtcache cache,
const AjPStr key,
AjPList idlist
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | Wildcard key |
AjPList | idlist | Modify | list of matching AjPBtIds |
void | | RETURN | |
Input
Input & Output
cache: | (Modify) | cache |
idlist: | (Modify) | list of matching AjPBtIds |
Returns
Description
Wildcard retrieval of entries
See Also
See other functions in this section
Availability
In release 6.4.0
Replace an ID structure in a leaf node given a key
Synopsis
Prototype
AjBool ajBtreeReplaceId (
AjPBtcache cache,
const AjPBtId rid
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPBtId | rid | Input | replacement id object |
AjBool | | RETURN | true if success |
Input
rid: | (Input) | replacement id object |
Input & Output
Returns
Description
Replace an ID structure in a leaf node given a key
See Also
See other functions in this section
Availability
In release 6.4.0
Read B+ tree entries from file
Synopsis
Prototype
ajuint ajBtreeReadEntries (
const char* filename,
const char* indexdir,
const char* directory,
AjPStr** seqfiles,
AjPStr** reffiles
);
Type | Name | Read/Write | Description |
const char* | filename | Input | file name |
const char* | indexdir | Input | index file directory |
const char* | directory | Input | file directory |
AjPStr** | seqfiles | Output | sequence file names |
AjPStr** | reffiles | Output | reference file names (if any) |
ajuint | | RETURN | number of entries |
Input
filename: | (Input) | file name |
indexdir: | (Input) | index file directory |
directory: | (Input) | file directory |
Output
seqfiles: | (Output) | sequence file names |
reffiles: | (Output) | reference file names (if any) |
Returns
Description
Read B+ tree entries from file
See Also
See other functions in this section
Availability
In release 6.4.0
Read B+ tree entries from file
Synopsis
Prototype
ajuint ajBtreeReadEntriesS (
const AjPStr filename,
const AjPStr indexdir,
const AjPStr directory,
AjPStr** seqfiles,
AjPStr** reffiles
);
Type | Name | Read/Write | Description |
const AjPStr | filename | Input | file name |
const AjPStr | indexdir | Input | index file directory |
const AjPStr | directory | Input | file directory |
AjPStr** | seqfiles | Output | sequence file names |
AjPStr** | reffiles | Output | reference file names (if any) |
ajuint | | RETURN | number of entries |
Input
filename: | (Input) | file name |
indexdir: | (Input) | index file directory |
directory: | (Input) | file directory |
Output
seqfiles: | (Output) | sequence file names |
reffiles: | (Output) | reference file names (if any) |
Returns
Description
Read B+ tree entries from file
See Also
See other functions in this section
Availability
In release 6.4.0
Get an ID structure from a leaf node given a key
Synopsis
Prototype
void ajBtreeInsertDupId (
AjPBtcache cache,
AjPBtId id
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
AjPBtId | id | Modify | potentially duplicate id |
void | | RETURN | |
Input & Output
cache: | (Modify) | cache |
id: | (Modify) | potentially duplicate id |
Returns
Description
Get an ID structure from a leaf node given a key
See Also
See other functions in this section
Availability
In release 6.4.0
Write B+ tree parameters to file
Synopsis
Prototype
AjPList ajBtreeDupFromKey (
AjPBtcache cache,
const AjPStr key
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key |
AjPList | | RETURN | list of matching AjPBtIds or NULL |
Input
Input & Output
Returns
AjPList: | list of matching AjPBtIds or NULL |
Description
Write B+ tree parameters to file
See Also
See other functions in this section
Availability
In release 6.4.0
Constructor for index bucket keyword information
Synopsis
Prototype
AjPBtPri ajBtreePriNew (
void
);
Type | Name | Read/Write | Description |
AjPBtPri | | RETURN | Index ID object |
Returns
Description
Constructor for index bucket keyword information
See Also
See other functions in this section
Availability
In release 6.4.0
Destructor for keyword index primary bucket information
Synopsis
Prototype
void ajBtreePriDel (
AjPBtPri* thys
);
Type | Name | Read/Write | Description |
AjPBtPri* | thys | Output | index keyword primary object |
void | | RETURN | |
Output
thys: | (Output) | index keyword primary object |
Returns
Description
Destructor for keyword index primary bucket information
See Also
See other functions in this section
Availability
In release 6.4.0
Insert a keyword structure into the tree
Synopsis
Prototype
AjBool ajBtreeInsertKeyword (
AjPBtcache cache,
AjPBtPri pri
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
AjPBtPri | pri | Modify | Id object |
AjBool | | RETURN | True if keyword and ID combination was inserted
False if keyword exists alraedy for ID |
Input & Output
cache: | (Modify) | cache |
pri: | (Modify) | Id object |
Returns
AjBool: | True if keyword and ID combination was inserted
False if keyword exists alraedy for ID |
Description
Insert a keyword structure into the tree
See Also
See other functions in this section
Availability
In release 6.4.0
Get Pri structure matching a keyword
Synopsis
Prototype
AjBool ajBtreePriFindKeyword (
AjPBtcache cache,
const AjPStr key,
ajulong* treeblock
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key |
ajulong* | treeblock | Output | Tree block number for id |
AjBool | | RETURN | ajTrue if found |
Input
Output
treeblock: | (Output) | Tree block number for id |
Input & Output
Returns
Description
Get Pri structure matching a keyword
See Also
See other functions in this section
Availability
In release 6.4.0
Get Pri structure matching a keyword truncated to maximum indexed length
Synopsis
Prototype
AjBool ajBtreePriFindKeywordLen (
AjPBtcache cache,
const AjPStr key,
ajulong* treeblock
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key |
ajulong* | treeblock | Output | Tree block number for id |
AjBool | | RETURN | ajTrue if found |
Input
Output
treeblock: | (Output) | Tree block number for id |
Input & Output
Returns
Description
Get Pri structure matching a keyword truncated to maximum indexed length
See Also
See other functions in this section
Availability
In release 6.4.0
Open a b+tree index file and initialise a cache object for keyword index
Synopsis
Prototype
AjPBtcache ajBtreeSecCacheNewC (
const char* filetxt,
const char* exttxt,
const char* idirtxt,
const char* mode,
AjBool compressed,
ajuint kwlimit,
ajuint pagesize,
ajuint cachesize,
ajulong pagecount,
ajuint order,
ajuint fill,
ajuint level,
ajuint sorder,
ajuint sfill,
ajulong count,
ajulong countall
);
Type | Name | Read/Write | Description |
const char* | filetxt | Input | name of file |
const char* | exttxt | Input | extension of file |
const char* | idirtxt | Input | index file directory |
const char* | mode | Input | opening mode |
AjBool | compressed | Input | Compressed index flag |
ajuint | kwlimit | Input | Max key size |
ajuint | pagesize | Input | pagesize |
ajuint | cachesize | Input | size of cache |
ajulong | pagecount | Input | page count |
ajuint | order | Input | Tree order |
ajuint | fill | Input | Number of entries per bucket |
ajuint | level | Input | level of tree |
ajuint | sorder | Input | order of secondary tree |
ajuint | sfill | Input | Number of entries per secondary bucket |
ajulong | count | Input | Number of entries in the index |
ajulong | countall | Input | Number of total entries in the index |
AjPBtcache | | RETURN | initialised disc block cache structure |
Input
filetxt: | (Input) | name of file |
exttxt: | (Input) | extension of file |
idirtxt: | (Input) | index file directory |
mode: | (Input) | opening mode |
compressed: | (Input) | Compressed index flag |
kwlimit: | (Input) | Max key size |
pagesize: | (Input) | pagesize |
cachesize: | (Input) | size of cache |
pagecount: | (Input) | page count |
order: | (Input) | Tree order |
fill: | (Input) | Number of entries per bucket |
level: | (Input) | level of tree |
sorder: | (Input) | order of secondary tree |
sfill: | (Input) | Number of entries per secondary bucket |
count: | (Input) | Number of entries in the index |
countall: | (Input) | Number of total entries in the index |
Returns
AjPBtcache: | initialised disc block cache structure |
Description
Open a b+tree index file and initialise a cache object for keyword index
See Also
See other functions in this section
Availability
In release 6.4.0
Open a b+tree index file and initialise a cache object for keyword index
Synopsis
Prototype
AjPBtcache ajBtreeSecCacheNewS (
const AjPStr file,
const AjPStr ext,
const AjPStr idir,
const char* mode,
AjBool compressed,
ajuint kwlimit,
ajuint pagesize,
ajuint cachesize,
ajulong pagecount,
ajuint order,
ajuint fill,
ajuint level,
ajuint sorder,
ajuint sfill,
ajulong count,
ajulong countall
);
Type | Name | Read/Write | Description |
const AjPStr | file | Input | name of file |
const AjPStr | ext | Input | extension of file |
const AjPStr | idir | Input | index file directory |
const char* | mode | Input | opening mode |
AjBool | compressed | Input | Compressed index flag |
ajuint | kwlimit | Input | Max key size |
ajuint | pagesize | Input | pagesize |
ajuint | cachesize | Input | size of cache |
ajulong | pagecount | Input | page count |
ajuint | order | Input | Tree order |
ajuint | fill | Input | Number of entries per bucket |
ajuint | level | Input | level of tree |
ajuint | sorder | Input | order of secondary tree |
ajuint | sfill | Input | Number of entries per secondary bucket |
ajulong | count | Input | Number of entries in the index |
ajulong | countall | Input | Number of total entries in the index |
AjPBtcache | | RETURN | initialised disc block cache structure |
Input
file: | (Input) | name of file |
ext: | (Input) | extension of file |
idir: | (Input) | index file directory |
mode: | (Input) | opening mode |
compressed: | (Input) | Compressed index flag |
kwlimit: | (Input) | Max key size |
pagesize: | (Input) | pagesize |
cachesize: | (Input) | size of cache |
pagecount: | (Input) | page count |
order: | (Input) | Tree order |
fill: | (Input) | Number of entries per bucket |
level: | (Input) | level of tree |
sorder: | (Input) | order of secondary tree |
sfill: | (Input) | Number of entries per secondary bucket |
count: | (Input) | Number of entries in the index |
countall: | (Input) | Number of total entries in the index |
Returns
AjPBtcache: | initialised disc block cache structure |
Description
Open a b+tree index file and initialise a cache object for keyword index
See Also
See other functions in this section
Availability
In release 6.4.0
Insert a secondary ID into the tree
Synopsis
Prototype
AjBool ajBtreeSecInsertId (
AjPBtcache cache,
const AjPStr id
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | id | Input | Id |
AjBool | | RETURN | True if ID was inserted
False if ID already exists |
Input
Input & Output
Returns
AjBool: | True if ID was inserted
False if ID already exists |
Description
Insert a secondary ID into the tree
See Also
See other functions in this section
Availability
In release 6.4.0
See whether ID already exists in the tree
Synopsis
Prototype
AjBool ajBtreeSecFindId (
AjPBtcache cache,
const AjPStr key
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key |
AjBool | | RETURN | true if ID already added |
Input
Input & Output
Returns
AjBool: | true if ID already added |
Description
See whether ID already exists in the tree
See Also
See other functions in this section
Availability
In release 6.4.0
Find the node that should contain a new key for insertion
Synopsis
Prototype
AjPBtpage ajBtreeSecFindInsert (
AjPBtcache cache,
const AjPStr key
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key to search for |
AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
key: | (Input) | key to search for |
Input & Output
Returns
AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a new key for insertion
See Also
See other functions in this section
Availability
In release 6.4.0
Test function: show if a primary tree root block is unlocked
Synopsis
Prototype
void ajBtreeLockTest (
AjPBtcache cache
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
void | | RETURN | |
Input & Output
Returns
Description
Test function: show if a primary tree root block is unlocked
See Also
See other functions in this section
Availability
In release 6.4.0
Read the leaves of a secondary tree
Synopsis
Prototype
AjPList ajBtreeSecLeafList (
AjPBtcache cache,
ajulong rootblock
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
ajulong | rootblock | Input | root page of secondary tree |
AjPList | | RETURN | List of IDs matching a keyword |
Input
rootblock: | (Input) | root page of secondary tree |
Input & Output
Returns
AjPList: | List of IDs matching a keyword |
Description
Read the leaves of a secondary tree
See Also
See other functions in this section
Availability
In release 6.4.0
Test routine: test for ID within a secondary tree
Synopsis
Prototype
AjBool ajBtreeVerifyId (
AjPBtcache cache,
ajulong rootblock,
const AjPStr id
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
ajulong | rootblock | Input | root page of secondary tree |
const AjPStr | id | Input | test ID |
AjBool | | RETURN | true if ID found |
Input
rootblock: | (Input) | root page of secondary tree |
id: | (Input) | test ID |
Input & Output
Returns
Description
Test routine: test for ID within a secondary tree
See Also
See other functions in this section
Availability
In release 6.4.0
Wildcard retrieval of keyword index entries
Synopsis
Prototype
AjPBtId ajBtreeIdFromKeywordW (
AjPBtcache cache,
AjPBtKeyWild wild,
AjPBtcache idcache
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
AjPBtKeyWild | wild | Modify | Wildcard |
AjPBtcache | idcache | Modify | id cache |
AjPBtId | | RETURN | next matching Id or NULL |
Input & Output
cache: | (Modify) | cache |
wild: | (Modify) | Wildcard |
idcache: | (Modify) | id cache |
Returns
AjPBtId: | next matching Id or NULL |
Description
Wildcard retrieval of keyword index entries
See Also
See other functions in this section
Availability
In release 6.4.0
Wildcard retrieval of keyword index entries
Synopsis
Prototype
void ajBtreeListFromKeywordW (
AjPBtcache cache,
const AjPStr key,
AjPBtcache idcache,
AjPList btidlist
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key |
AjPBtcache | idcache | Modify | id cache |
AjPList | btidlist | Modify | List of matching AjPBtId entries |
void | | RETURN | |
Input
Input & Output
cache: | (Modify) | cache |
idcache: | (Modify) | id cache |
btidlist: | (Modify) | List of matching AjPBtId entries |
Returns
Description
Wildcard retrieval of keyword index entries
See Also
See other functions in this section
Availability
In release 6.4.0
Constructor for index bucket ID information
Synopsis
Prototype
AjPBtHybrid ajBtreeHybNew (
void
);
Type | Name | Read/Write | Description |
AjPBtHybrid | | RETURN | Index ID object |
Returns
AjPBtHybrid: | Index ID object |
Description
Constructor for index bucket ID information
See Also
See other functions in this section
Availability
In release 6.4.0
Destructor for index bucket ID information
Synopsis
Prototype
void ajBtreeHybDel (
AjPBtHybrid* Pthis
);
Type | Name | Read/Write | Description |
AjPBtHybrid* | Pthis | Output | index ID object |
void | | RETURN | |
Output
Pthis: | (Output) | index ID object |
Returns
Description
Destructor for index bucket ID information
See Also
See other functions in this section
Availability
In release 6.4.0
Find the node that should contain a new key for insertion
Synopsis
Prototype
AjPBtpage ajBtreeHybFindInsert (
AjPBtcache cache,
const AjPStr key
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPStr | key | Input | key to search for |
AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
key: | (Input) | key to search for |
Input & Output
Returns
AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a new key for insertion
See Also
See other functions in this section
Availability
In release 6.4.0
Insert an ID structure into the tree
Synopsis
Prototype
void ajBtreeHybInsertId (
AjPBtcache cache,
AjPBtHybrid hyb
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
AjPBtHybrid | hyb | Modify | Id object |
void | | RETURN | pointer to a page |
Input & Output
cache: | (Modify) | cache |
hyb: | (Modify) | Id object |
Returns
Description
Insert an ID structure into the tree
See Also
See other functions in this section
Availability
In release 6.4.0
Find the node that should contain a new key for insertion
Synopsis
Prototype
AjPBtpage ajBtreeNumFindInsert (
AjPBtcache cache,
const ajulong key
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const ajulong | key | Input | key to search for |
AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
key: | (Input) | key to search for |
Input & Output
Returns
AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a new key for insertion
See Also
See other functions in this section
Availability
In release 6.4.0
Insert a file offset key into a secondary tree
Synopsis
Prototype
void ajBtreeInsertNum (
AjPBtcache cache,
const AjPBtNumId num,
AjPBtpage page
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPBtNumId | num | Input | Id object |
AjPBtpage | page | Output | cache page |
void | | RETURN | pointer to a page |
Input
Output
Input & Output
Returns
Description
Insert a file offset key into a secondary tree
See Also
See other functions in this section
Availability
In release 6.4.0
Free karray and parray arrays for a primary key
Synopsis
Prototype
void ajBtreeFreePriArray (
AjPBtcache cache
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
void | | RETURN | |
Input & Output
Returns
Description
Free karray and parray arrays for a primary key
See Also
See other functions in this section
Availability
In release 6.4.0
Free karray and parray arrays for a secondary key
Synopsis
Prototype
void ajBtreeFreeSecArray (
AjPBtcache cache
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
void | | RETURN | |
Input & Output
Returns
Description
Free karray and parray arrays for a secondary key
See Also
See other functions in this section
Availability
In release 6.4.0
Read the leaves of a secondary hybrid tree
Synopsis
Prototype
void ajBtreeHybLeafList (
AjPBtcache cache,
ajulong rootblock,
const AjPStr idname,
AjPList list
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
ajulong | rootblock | Input | root page of secondary tree |
const AjPStr | idname | Input | id name |
AjPList | list | Modify | list to add BtIDs to |
void | | RETURN | |
Input
rootblock: | (Input) | root page of secondary tree |
idname: | (Input) | id name |
Input & Output
cache: | (Modify) | cache |
list: | (Modify) | list to add BtIDs to |
Returns
Description
Read the leaves of a secondary hybrid tree
See Also
See other functions in this section
Availability
In release 6.4.0
Read the leaves of a primary hybrid tree (requested by EBI services)
Synopsis
Prototype
void ajBtreeDumpHybKeys (
AjPBtcache cache,
ajuint dmin,
ajuint dmax,
AjPFile outf
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
ajuint | dmin | Input | minimum number of times the key should appear |
ajuint | dmax | Input | maximum number of times the key should appear |
AjPFile | outf | Modify | output file |
void | | RETURN | |
Input
dmin: | (Input) | minimum number of times the key should appear |
dmax: | (Input) | maximum number of times the key should appear |
Input & Output
cache: | (Modify) | cache |
outf: | (Modify) | output file |
Returns
Description
Read the leaves of a primary hybrid tree (requested by EBI services)
See Also
See other functions in this section
Availability
In release 6.4.0
Entry point for hybrid ID deletion.
Deletion software
Synopsis
Prototype
AjBool ajBtreeDeleteHybId (
AjPBtcache cache,
const AjPBtHybrid hyb
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPBtHybrid | hyb | Input | hybrid object |
AjBool | | RETURN | True if found and deleted |
Input
Input & Output
Returns
AjBool: | True if found and deleted |
Description
Entry point for hybrid ID deletion.
Deletion software
See Also
See other functions in this section
Availability
In release 6.4.0
Entry point for keyword tree ID deletion.
Deletion software
Synopsis
Prototype
AjBool ajBtreeDeletePriId (
AjPBtcache cache,
const AjPBtPri pri
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Modify | cache |
const AjPBtPri | pri | Input | keyword object |
AjBool | | RETURN | True if found and deleted |
Input
pri: | (Input) | keyword object |
Input & Output
Returns
AjBool: | True if found and deleted |
Description
Entry point for keyword tree ID deletion.
Deletion software
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the number of pages in a tree index
Synopsis
Prototype
ajulong ajBtreeGetPagecount (
const AjPBtcache cache
);
Type | Name | Read/Write | Description |
const AjPBtcache | cache | Input | cache |
ajulong | | RETURN | number of pages in a tree index |
Input
Returns
ajulong: | number of pages in a tree index |
Description
Returns the number of pages in a tree index
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the page size a tree index
Synopsis
Prototype
ajuint ajBtreeGetPagesize (
const AjPBtcache cache
);
Type | Name | Read/Write | Description |
const AjPBtcache | cache | Input | cache |
ajuint | | RETURN | Page size of a tree index |
Input
Returns
ajuint: | Page size of a tree index |
Description
Returns the page size a tree index
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the number of bytes in a tree index
Synopsis
Prototype
ajulong ajBtreeGetTotsize (
const AjPBtcache cache
);
Type | Name | Read/Write | Description |
const AjPBtcache | cache | Input | cache |
ajulong | | RETURN | number of bytes in a tree index |
Input
Returns
ajulong: | number of bytes in a tree index |
Description
Returns the number of bytes in a tree index
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the node type name of a tree index page
Synopsis
Prototype
const char* ajBtreePageGetTypename (
const AjPBtpage page
);
Type | Name | Read/Write | Description |
const AjPBtpage | page | Input | Page |
const char* | | RETURN | Name of page type |
Input
Returns
const char*: | Name of page type |
Description
Returns the node type name of a tree index page
See Also
See other functions in this section
Availability
In release 6.4.0
Returns number of keys, overflow pages visited and free space unused
for a b+ tree node page
Synopsis
Prototype
AjBool ajBtreeStatNode (
AjPBtcache cache,
const AjPBtpage page,
AjBool full,
ajuint* nkeys,
ajuint* overflows,
ajuint* freespace,
ajulong* refs,
const AjPTable newpostable
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
const AjPBtpage | page | Input | Page |
AjBool | full | Input | If true, write detailed debug report |
ajuint* | nkeys | Output | Number of keys |
ajuint* | overflows | Output | Number of overflow pages |
ajuint* | freespace | Output | Unused space in this page |
ajulong* | refs | Modify | References to pages |
const AjPTable | newpostable | Input | Page numbers for page offsets |
AjBool | | RETURN | True on success |
Input
page: | (Input) | Page |
full: | (Input) | If true, write detailed debug report |
newpostable: | (Input) | Page numbers for page offsets |
Output
cache: | (Output) | cache |
nkeys: | (Output) | Number of keys |
overflows: | (Output) | Number of overflow pages |
freespace: | (Output) | Unused space in this page |
Input & Output
refs: | (Modify) | References to pages |
Returns
Description
Returns number of keys, overflow pages visited and free space unused
for a b+ tree node page
See Also
See other functions in this section
Availability
In release 6.4.0
Returns number of keys, overflow pages visited and free space unused
for a b+ tree numeric node page
Synopsis
Prototype
AjBool ajBtreeStatNumnode (
AjPBtcache cache,
const AjPBtpage page,
AjBool full,
ajuint* nkeys,
ajuint* overflows,
ajuint* freespace,
ajulong* refs,
const AjPTable newpostable
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
const AjPBtpage | page | Input | Page |
AjBool | full | Input | If true, write detailed debug report |
ajuint* | nkeys | Output | Number of keys |
ajuint* | overflows | Output | Number of overflow pages |
ajuint* | freespace | Output | Unused space in this page |
ajulong* | refs | Modify | References to pages |
const AjPTable | newpostable | Input | Page numbers for page offsets |
AjBool | | RETURN | True on success |
Input
page: | (Input) | Page |
full: | (Input) | If true, write detailed debug report |
newpostable: | (Input) | Page numbers for page offsets |
Output
cache: | (Output) | cache |
nkeys: | (Output) | Number of keys |
overflows: | (Output) | Number of overflow pages |
freespace: | (Output) | Unused space in this page |
Input & Output
refs: | (Modify) | References to pages |
Returns
Description
Returns number of keys, overflow pages visited and free space unused
for a b+ tree numeric node page
See Also
See other functions in this section
Availability
In release 6.4.0
Returns number of keys, overflow pages visited and free space unused
for a b+ tree bucket page
Synopsis
Prototype
AjBool ajBtreeStatBucket (
AjPBtcache cache,
const AjPBtpage page,
AjBool full,
ajuint* nentries,
ajuint* ndups,
ajuint* nextra,
ajuint* overflows,
ajuint* freespace,
ajulong* refs,
const AjPTable newpostable
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
const AjPBtpage | page | Input | Page |
AjBool | full | Input | If true, write detailed debug report |
ajuint* | nentries | Output | Number of entries |
ajuint* | ndups | Output | Number of entries with duplicates |
ajuint* | nextra | Output | Number of extra entries as duplicates |
ajuint* | overflows | Output | Number of overflow pages |
ajuint* | freespace | Output | Unused space in this page |
ajulong* | refs | Modify | References to pages |
const AjPTable | newpostable | Input | Page numbers for page offsets |
AjBool | | RETURN | True on success |
Input
page: | (Input) | Page |
full: | (Input) | If true, write detailed debug report |
newpostable: | (Input) | Page numbers for page offsets |
Output
cache: | (Output) | cache |
nentries: | (Output) | Number of entries |
ndups: | (Output) | Number of entries with duplicates |
nextra: | (Output) | Number of extra entries as duplicates |
overflows: | (Output) | Number of overflow pages |
freespace: | (Output) | Unused space in this page |
Input & Output
refs: | (Modify) | References to pages |
Returns
Description
Returns number of keys, overflow pages visited and free space unused
for a b+ tree bucket page
See Also
See other functions in this section
Availability
In release 6.4.0
Returns number of keys, overflow pages visited and free space unused
for a b+ tree secondary bucket page
Synopsis
Prototype
AjBool ajBtreeStatNumbucket (
AjPBtcache cache,
const AjPBtpage page,
AjBool full,
ajuint* nentries,
ajuint* overflows,
ajuint* freespace
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
const AjPBtpage | page | Input | Page |
AjBool | full | Input | If true, write detailed debug report |
ajuint* | nentries | Output | Number of entries |
ajuint* | overflows | Output | Number of overflow pages |
ajuint* | freespace | Output | Unused space in this page |
AjBool | | RETURN | True on success |
Input
page: | (Input) | Page |
full: | (Input) | If true, write detailed debug report |
Output
cache: | (Output) | cache |
nentries: | (Output) | Number of entries |
overflows: | (Output) | Number of overflow pages |
freespace: | (Output) | Unused space in this page |
Returns
Description
Returns number of keys, overflow pages visited and free space unused
for a b+ tree secondary bucket page
See Also
See other functions in this section
Availability
In release 6.4.0
Returns number of keys, overflow pages visited and free space unused
for a b+ tree primary bucket page
Synopsis
Prototype
AjBool ajBtreeStatPribucket (
AjPBtcache cache,
const AjPBtpage page,
AjBool full,
ajuint* nentries,
ajuint* overflows,
ajuint* freespace,
ajulong* refs,
const AjPTable newpostable
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
const AjPBtpage | page | Input | Page |
AjBool | full | Input | If true, write detailed debug report |
ajuint* | nentries | Output | Number of entries |
ajuint* | overflows | Output | Number of overflow pages |
ajuint* | freespace | Output | Unused space in this page |
ajulong* | refs | Modify | References to pages |
const AjPTable | newpostable | Input | Page numbers for page offsets |
AjBool | | RETURN | True on success |
Input
page: | (Input) | Page |
full: | (Input) | If true, write detailed debug report |
newpostable: | (Input) | Page numbers for page offsets |
Output
cache: | (Output) | cache |
nentries: | (Output) | Number of entries |
overflows: | (Output) | Number of overflow pages |
freespace: | (Output) | Unused space in this page |
Input & Output
refs: | (Modify) | References to pages |
Returns
Description
Returns number of keys, overflow pages visited and free space unused
for a b+ tree primary bucket page
See Also
See other functions in this section
Availability
In release 6.4.0
Returns number of keys, overflow pages visited and free space unused
for a b+ tree numeric bucket page
Synopsis
Prototype
AjBool ajBtreeStatSecbucket (
AjPBtcache cache,
const AjPBtpage page,
AjBool full,
ajuint* nentries,
ajuint* overflows,
ajuint* freespace
);
Type | Name | Read/Write | Description |
AjPBtcache | cache | Output | cache |
const AjPBtpage | page | Input | Page |
AjBool | full | Input | If true, write detailed debug report |
ajuint* | nentries | Output | Number of entries |
ajuint* | overflows | Output | Number of overflow pages |
ajuint* | freespace | Output | Unused space in this page |
AjBool | | RETURN | True on success |
Input
page: | (Input) | Page |
full: | (Input) | If true, write detailed debug report |
Output
cache: | (Output) | cache |
nentries: | (Output) | Number of entries |
overflows: | (Output) | Number of overflow pages |
freespace: | (Output) | Unused space in this page |
Returns
Description
Returns number of keys, overflow pages visited and free space unused
for a b+ tree numeric bucket page
See Also
See other functions in this section
Availability
In release 6.4.0
Return the used size of a cache page
Synopsis
Prototype
ajuint ajBtreePageGetSize (
const AjPBtpage page
);
Type | Name | Read/Write | Description |
const AjPBtpage | page | Input | Page |
ajuint | | RETURN | Used page size |
Input
Returns
Description
Return the used size of a cache page
See Also
See other functions in this section
Availability
In release 6.4.0
Cleans up B+tree indexing internal memory
Synopsis
Prototype
void ajBtreeExit (
void
);
Type | Name | Read/Write | Description |
void | | RETURN | |
Returns
Description
Cleans up B+tree indexing internal memory
See Also
See other functions in this section
Availability
In release 6.4.0
Comparison function for sorting B+tree ID objects by database file number
and offset.
Using the file and position allows unique identifiers to be
compared with other primary keys such bas accession number.
Synopsis
Prototype
ajint ajBtreeIdCmp (
const void* x,
const void* y
);
Type | Name | Read/Write | Description |
const void* | x | Input | Standard argument. Item value. |
const void* | y | Input | Standard argument. Comparison item value. |
ajint | | RETURN | Comparison result. Zero if equal, non-zero if different. |
Input
x: | (Input) | Standard argument. Item value. |
y: | (Input) | Standard argument. Comparison item value. |
Returns
ajint: | Comparison result. Zero if equal, non-zero if different. |
Description
Comparison function for sorting B+tree ID objects by database file number
and offset.
Using the file and position allows unique identifiers to be
compared with other primary keys such bas accession number.
See Also
See other functions in this section
Availability
In release 6.4.0
Hash function for a table with a B+tree primary key
Synopsis
Prototype
ajuint ajBtreeIdHash (
const void* key,
ajuint hashsize
);
Type | Name | Read/Write | Description |
const void* | key | Input | Standard argument. Table key. |
ajuint | hashsize | Input | Standard argument. Estimated Hash size. |
ajuint | | RETURN | Hash value in range 0 to hashsize-1 |
Input
key: | (Input) | Standard argument. Table key. |
hashsize: | (Input) | Standard argument. Estimated Hash size. |
Returns
ajuint: | Hash value in range 0 to hashsize-1 |
Description
Hash function for a table with a B+tree primary key
See Also
See other functions in this section
Availability
In release 6.4.0