embdbi.c
Constructor for field token structures.
Synopsis
Prototype
EmbPField embDbiFieldNew (
void
);
Type | Name | Read/Write | Description |
EmbPField | | RETURN | Field token structure. |
Returns
EmbPField: | Field token structure. |
Description
Constructor for field token structures.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Destructor for field token structures.
Synopsis
Prototype
void embDbiFieldDel (
EmbPField* pthys
);
Type | Name | Read/Write | Description |
EmbPField* | pthys | Delete | Field token structure. |
void | | RETURN | |
Output
pthys: | (Delete) | Field token structure. |
Returns
Description
Destructor for field token structures.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Destructor for field token structures to be mapped to lists or tables.
Synopsis
Prototype
void embDbiFieldDelMap (
void** pthys,
void* cl
);
Type | Name | Read/Write | Description |
void** | pthys | Delete | Field token structure. |
void* | cl | Modify | Unused |
void | | RETURN | |
Output
pthys: | (Delete) | Field token structure. |
Input & Output
Returns
Description
Destructor for field token structures to be mapped to lists or tables.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Comparison function for two entries.
Synopsis
Prototype
ajint embDbiCmpId (
const void* a,
const void* b
);
Type | Name | Read/Write | Description |
const void* | a | Input | First id (EmbPEntry*) |
const void* | b | Input | Second id (EmbPEntry*) |
ajint | | RETURN | Comparison value, -1, 0 or +1. |
Input
a: | (Input) | First id (EmbPEntry*) |
b: | (Input) | Second id (EmbPEntry*) |
Returns
ajint: | Comparison value, -1, 0 or +1. |
Description
Comparison function for two entries.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Comparison function for the entrynames in two field structures.
Synopsis
Prototype
ajint embDbiCmpFieldId (
const void* a,
const void* b
);
Type | Name | Read/Write | Description |
const void* | a | Input | First id (EmbPField*) |
const void* | b | Input | Second id (EmbPField*) |
ajint | | RETURN | Comparison value, -1, 0 or +1. |
Input
a: | (Input) | First id (EmbPField*) |
b: | (Input) | Second id (EmbPField*) |
Returns
ajint: | Comparison value, -1, 0 or +1. |
Description
Comparison function for the entrynames in two field structures.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Comparison function for two field token values
Synopsis
Prototype
ajint embDbiCmpFieldField (
const void* a,
const void* b
);
Type | Name | Read/Write | Description |
const void* | a | Input | First id (EmbPField*) |
const void* | b | Input | Second id (EmbPField*) |
ajint | | RETURN | Comparison value, -1, 0 or +1. |
Input
a: | (Input) | First id (EmbPField*) |
b: | (Input) | Second id (EmbPField*) |
Returns
ajint: | Comparison value, -1, 0 or +1. |
Description
Comparison function for two field token values
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Constructor for entry structures.
Synopsis
Prototype
EmbPEntry embDbiEntryNew (
ajuint nfields
);
Type | Name | Read/Write | Description |
ajuint | nfields | Input | Number of data fields to be included |
EmbPEntry | | RETURN | Entry structure. |
Input
nfields: | (Input) | Number of data fields to be included |
Returns
EmbPEntry: | Entry structure. |
Description
Constructor for entry structures.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Destructor for entry structures.
Synopsis
Prototype
void embDbiEntryDel (
EmbPEntry* Pentry
);
Type | Name | Read/Write | Description |
EmbPEntry* | Pentry | Delete | Entry structure |
void | | RETURN | |
Output
Pentry: | (Delete) | Entry structure |
Returns
Description
Destructor for entry structures.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Destructor for entry structures to be mapped to lists or tables.
Synopsis
Prototype
void embDbiEntryDelMap (
void** pthys,
void* cl
);
Type | Name | Read/Write | Description |
void** | pthys | Delete | Field token structure. |
void* | cl | Modify | Unused |
void | | RETURN | |
Output
pthys: | (Delete) | Field token structure. |
Input & Output
Returns
Description
Destructor for entry structures to be mapped to lists or tables.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Makes a list of all files in a directory matching a wildcard file name.
Synopsis
Prototype
AjPList embDbiFileList (
const AjPStr dir,
const AjPStr wildfile,
AjBool trim
);
Type | Name | Read/Write | Description |
const AjPStr | dir | Input | Directory |
const AjPStr | wildfile | Input | Wildcard file name |
AjBool | trim | Input | Expand to search, trim results |
AjPList | | RETURN | New list of all files with full paths |
Input
dir: | (Input) | Directory |
wildfile: | (Input) | Wildcard file name |
trim: | (Input) | Expand to search, trim results |
Returns
AjPList: | New list of all files with full paths |
Description
Makes a list of all files in a directory matching a wildcard file name.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Makes a list of all files in a directory matching a wildcard file name.
Synopsis
Prototype
AjPList embDbiFileListExc (
const AjPStr dir,
const AjPStr wildfile,
const AjPStr exclude
);
Type | Name | Read/Write | Description |
const AjPStr | dir | Input | Directory |
const AjPStr | wildfile | Input | Wildcard file list |
const AjPStr | exclude | Input | Wildcard file list
(NULL if none to exclude) |
AjPList | | RETURN | New list of all files with full paths |
Input
dir: | (Input) | Directory |
wildfile: | (Input) | Wildcard file list |
exclude: | (Input) | Wildcard file list
(NULL if none to exclude) |
Returns
AjPList: | New list of all files with full paths |
Description
Makes a list of all files in a directory matching a wildcard file name.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Open a flat file library
Synopsis
Prototype
AjBool embDbiFlatOpenlib (
const AjPStr lname,
AjPFile* libr
);
Type | Name | Read/Write | Description |
const AjPStr | lname | Input | Source file basename |
AjPFile* | libr | Modify | Database file |
AjBool | | RETURN | ajTrue on success |
Input
lname: | (Input) | Source file basename |
Input & Output
libr: | (Modify) | Database file |
Returns
Description
Open a flat file library
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Remove a file or a set of numbered files
Synopsis
Prototype
void embDbiRmFile (
const AjPStr dbname,
const char* ext,
ajuint nfiles,
AjBool cleanup
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name |
const char* | ext | Input | Base file extension |
ajuint | nfiles | Input | Number of files, or zero for unnumbered. |
AjBool | cleanup | Input | If ajTrue, clean up temporary files after |
void | | RETURN | |
Input
dbname: | (Input) | Database name |
ext: | (Input) | Base file extension |
nfiles: | (Input) | Number of files, or zero for unnumbered. |
cleanup: | (Input) | If ajTrue, clean up temporary files after |
Returns
Description
Remove a file or a set of numbered files
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Remove a numbered file
Synopsis
Prototype
void embDbiRmFileI (
const AjPStr dbname,
const char* ext,
ajuint ifile,
AjBool cleanup
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name |
const char* | ext | Input | Base file extension |
ajuint | ifile | Input | File number. |
AjBool | cleanup | Input | If ajTrue, clean up temporary files after |
void | | RETURN | |
Input
dbname: | (Input) | Database name |
ext: | (Input) | Base file extension |
ifile: | (Input) | File number. |
cleanup: | (Input) | If ajTrue, clean up temporary files after |
Returns
Description
Remove a numbered file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Remove the sorted entryname file (kept until end of processing
as it is the sorted list of all entries, used to count entries for
field indexing.
Synopsis
Prototype
void embDbiRmEntryFile (
const AjPStr dbname,
AjBool cleanup
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name |
AjBool | cleanup | Input | If ajTrue, clean up temporary files after |
void | | RETURN | |
Input
dbname: | (Input) | Database name |
cleanup: | (Input) | If ajTrue, clean up temporary files after |
Returns
Description
Remove the sorted entryname file (kept until end of processing
as it is the sorted list of all entries, used to count entries for
field indexing.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Sort a file, or a set of numbered files, individually
Synopsis
Prototype
void embDbiSortFile (
const AjPStr dbname,
const char* ext1,
const char* ext2,
ajuint nfiles,
AjBool cleanup,
const AjPStr sortopt
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name |
const char* | ext1 | Input | Input file extension |
const char* | ext2 | Input | Output file extension |
ajuint | nfiles | Input | Number of files to sort (zero if unnumbered) |
AjBool | cleanup | Input | If ajTrue, clean up temporary files after |
const AjPStr | sortopt | Input | Extra options for the system sort |
void | | RETURN | |
Input
dbname: | (Input) | Database name |
ext1: | (Input) | Input file extension |
ext2: | (Input) | Output file extension |
nfiles: | (Input) | Number of files to sort (zero if unnumbered) |
cleanup: | (Input) | If ajTrue, clean up temporary files after |
sortopt: | (Input) | Extra options for the system sort |
Returns
Description
Sort a file, or a set of numbered files, individually
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Updates the file header for an index file to include the correct file size.
Synopsis
Prototype
void embDbiHeaderSize (
AjPFile file,
ajuint filesize,
ajuint recordcnt
);
Type | Name | Read/Write | Description |
AjPFile | file | Modify | Output file |
ajuint | filesize | Input | File size (if known, can be rewritten) |
ajuint | recordcnt | Input | Number of records |
void | | RETURN | |
Input
filesize: | (Input) | File size (if known, can be rewritten) |
recordcnt: | (Input) | Number of records |
Input & Output
Returns
Description
Updates the file header for an index file to include the correct file size.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes the header for an index file. Resets the file pointer to beginning
of file, and leaves the file pointer at the start of the first record.
Synopsis
Prototype
void embDbiHeader (
AjPFile file,
ajuint filesize,
ajuint recordcnt,
short recordlen,
const AjPStr dbname,
const AjPStr release,
const char[4] date
);
Type | Name | Read/Write | Description |
AjPFile | file | Modify | Output file |
ajuint | filesize | Input | File size (if known, can be rewritten) |
ajuint | recordcnt | Input | Number of records |
short | recordlen | Input | Record length (bytes) |
const AjPStr | dbname | Input | Database name (up to 20 characters used) |
const AjPStr | release | Input | Release as a string (up to 10
characters used) |
const char[4] | date | Input | Date dd,mm,yy,00 |
void | | RETURN | |
Input
filesize: | (Input) | File size (if known, can be rewritten) |
recordcnt: | (Input) | Number of records |
recordlen: | (Input) | Record length (bytes) |
dbname: | (Input) | Database name (up to 20 characters used) |
release: | (Input) | Release as a string (up to 10
characters used) |
date: | (Input) | Date dd,mm,yy,00 |
Input & Output
Returns
Description
Writes the header for an index file. Resets the file pointer to beginning
of file, and leaves the file pointer at the start of the first record.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Builds a filename for a single temporary file to save IDs or some other
index field, for example EMBL01.list
Synopsis
Prototype
AjPFile embDbiFileSingle (
const AjPStr dbname,
const char* extension,
ajuint num
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name |
const char* | extension | Input | Filename extension. |
ajuint | num | Input | Number for this file (start at 1) |
AjPFile | | RETURN | Opened output file |
Input
dbname: | (Input) | Database name |
extension: | (Input) | Filename extension. |
num: | (Input) | Number for this file (start at 1) |
Returns
AjPFile: | Opened output file |
Description
Builds a filename for a single temporary file to save IDs or some other
index field, for example EMBL01.list
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Builds a filename for a summary file to read IDs or some other
index field, for example EMBL.acnum_sort
Synopsis
Prototype
AjPFile embDbiFileIn (
const AjPStr dbname,
const char* extension
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name |
const char* | extension | Input | Filename extension. |
AjPFile | | RETURN | Opened output file |
Input
dbname: | (Input) | Database name |
extension: | (Input) | Filename extension. |
Returns
AjPFile: | Opened output file |
Description
Builds a filename for a summary file to read IDs or some other
index field, for example EMBL.acnum_sort
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Builds a filename for a summary file to save IDs or some other
index field, for example EMBL.acnum_srt2
Synopsis
Prototype
AjPFile embDbiFileOut (
const AjPStr dbname,
const char* extension
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name |
const char* | extension | Input | Filename extension. |
AjPFile | | RETURN | Opened output file |
Input
dbname: | (Input) | Database name |
extension: | (Input) | Filename extension. |
Returns
AjPFile: | Opened output file |
Description
Builds a filename for a summary file to save IDs or some other
index field, for example EMBL.acnum_srt2
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Builds a filename for a summary file to save IDs or some other
index field, for example EMBL.acsrt2
Synopsis
Prototype
AjPFile embDbiFileIndex (
const AjPStr indexdir,
const AjPStr field,
const char* extension
);
Type | Name | Read/Write | Description |
const AjPStr | indexdir | Input | Index directory |
const AjPStr | field | Input | Field name |
const char* | extension | Input | Filename extension. |
AjPFile | | RETURN | Opened output file |
Input
indexdir: | (Input) | Index directory |
field: | (Input) | Field name |
extension: | (Input) | Filename extension. |
Returns
AjPFile: | Opened output file |
Description
Builds a filename for a summary file to save IDs or some other
index field, for example EMBL.acsrt2
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes the division index file
Synopsis
Prototype
void embDbiWriteDivision (
const AjPStr indexdir,
const AjPStr dbname,
const AjPStr release,
const char[4] date,
ajuint maxfilelen,
ajuint nfiles,
AjPStr const* divfiles,
AjPStr const* seqfiles
);
Type | Name | Read/Write | Description |
const AjPStr | indexdir | Input | Index directory |
const AjPStr | dbname | Input | Database name |
const AjPStr | release | Input | Release number as a string |
const char[4] | date | Input | Date |
ajuint | maxfilelen | Input | Max file name length |
ajuint | nfiles | Input | Number of files indexes |
AjPStr const* | divfiles | Input | Division filenames |
AjPStr const* | seqfiles | Input | Sequence filenames (or NULL if none) |
void | | RETURN | |
Input
indexdir: | (Input) | Index directory |
dbname: | (Input) | Database name |
release: | (Input) | Release number as a string |
date: | (Input) | Date |
maxfilelen: | (Input) | Max file name length |
nfiles: | (Input) | Number of files indexes |
divfiles: | (Input) | Division filenames |
seqfiles: | (Input) | Sequence filenames (or NULL if none) |
Returns
Description
Writes the division index file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes a record to the division lookup file
Synopsis
Prototype
void embDbiWriteDivisionRecord (
AjPFile file,
ajuint maxnamlen,
short recnum,
const AjPStr datfile,
const AjPStr seqfile
);
Type | Name | Read/Write | Description |
AjPFile | file | Modify | Index file |
ajuint | maxnamlen | Input | Maximum file name length |
short | recnum | Input | Record number |
const AjPStr | datfile | Input | Data file name |
const AjPStr | seqfile | Input | Sequence file name (or NULL if none) |
void | | RETURN | |
Input
maxnamlen: | (Input) | Maximum file name length |
recnum: | (Input) | Record number |
datfile: | (Input) | Data file name |
seqfile: | (Input) | Sequence file name (or NULL if none) |
Input & Output
Returns
Description
Writes a record to the division lookup file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes a record to the entryname index file
Synopsis
Prototype
void embDbiWriteEntryRecord (
AjPFile file,
ajuint maxidlen,
const AjPStr id,
ajuint rpos,
ajuint spos,
ajushort filenum
);
Type | Name | Read/Write | Description |
AjPFile | file | Modify | hit file |
ajuint | maxidlen | Input | Maximum length for an id string |
const AjPStr | id | Input | The id string for this entry |
ajuint | rpos | Input | Data file offset |
ajuint | spos | Input | sequence file offset |
ajushort | filenum | Input | file number in division file |
void | | RETURN | |
Input
maxidlen: | (Input) | Maximum length for an id string |
id: | (Input) | The id string for this entry |
rpos: | (Input) | Data file offset |
spos: | (Input) | sequence file offset |
filenum: | (Input) | file number in division file |
Input & Output
Returns
Description
Writes a record to the entryname index file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes a record to the field hit (.hit) index file
Synopsis
Prototype
void embDbiWriteHit (
AjPFile file,
ajuint idnum
);
Type | Name | Read/Write | Description |
AjPFile | file | Modify | hit file |
ajuint | idnum | Input | Entry number (1 for the first) in the
entryname file |
void | | RETURN | |
Input
idnum: | (Input) | Entry number (1 for the first) in the
entryname file |
Input & Output
Returns
Description
Writes a record to the field hit (.hit) index file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes a record to the field target (.trg) index file
Synopsis
Prototype
void embDbiWriteTrg (
AjPFile file,
ajuint maxfieldlen,
ajuint idnum,
ajuint idcnt,
const AjPStr hitstr
);
Type | Name | Read/Write | Description |
AjPFile | file | Modify | hit file |
ajuint | maxfieldlen | Input | Maximum field token length |
ajuint | idnum | Input | First record number (1 for the first) in the
field hit index file |
ajuint | idcnt | Input | Number of entries for this field value
in the field hit index file |
const AjPStr | hitstr | Input | Field token string |
void | | RETURN | |
Input
maxfieldlen: | (Input) | Maximum field token length |
idnum: | (Input) | First record number (1 for the first) in the
field hit index file |
idcnt: | (Input) | Number of entries for this field value
in the field hit index file |
hitstr: | (Input) | Field token string |
Input & Output
Returns
Description
Writes a record to the field target (.trg) index file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Open sort files for entries and all fields
Synopsis
Prototype
AjPFile embDbiSortOpen (
AjPFile* alistfile,
ajuint ifile,
const AjPStr dbname,
AjPStr const* fields,
ajuint nfields
);
Type | Name | Read/Write | Description |
AjPFile* | alistfile | Output | Sort files for each field. |
ajuint | ifile | Input | Input file number (used for temporary file names) |
const AjPStr | dbname | Input | Database name
(used for temporary file names) |
AjPStr const* | fields | Input | Field names (used for temporary
file names) |
ajuint | nfields | Input | Number of fields |
AjPFile | | RETURN | Sort file for entries |
Input
ifile: | (Input) | Input file number (used for temporary file names) |
dbname: | (Input) | Database name
(used for temporary file names) |
fields: | (Input) | Field names (used for temporary
file names) |
nfields: | (Input) | Number of fields |
Output
alistfile: | (Output) | Sort files for each field. |
Returns
AjPFile: | Sort file for entries |
Description
Open sort files for entries and all fields
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Close the sort files for entries and all fields
Synopsis
Prototype
void embDbiSortClose (
AjPFile* elistfile,
AjPFile* alistfile,
ajuint nfields
);
Type | Name | Read/Write | Description |
AjPFile* | elistfile | Modify | Sort file for entries |
AjPFile* | alistfile | Modify | Sort files for each field. |
ajuint | nfields | Input | Number of fields |
void | | RETURN | |
Input
nfields: | (Input) | Number of fields |
Input & Output
elistfile: | (Modify) | Sort file for entries |
alistfile: | (Modify) | Sort files for each field. |
Returns
Description
Close the sort files for entries and all fields
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Stores data for current entry in memory by appending to lists
Synopsis
Prototype
void embDbiMemEntry (
AjPList idlist,
AjPList* fieldList,
ajuint nfields,
EmbPEntry entry,
ajuint ifile
);
Type | Name | Read/Write | Description |
AjPList | idlist | Modify | List of entry IDs |
AjPList* | fieldList | Modify | List of field tokens for each field |
ajuint | nfields | Input | Number of fields |
EmbPEntry | entry | Modify | Current entry |
ajuint | ifile | Input | Current input file number |
void | | RETURN | |
Input
nfields: | (Input) | Number of fields |
ifile: | (Input) | Current input file number |
Input & Output
idlist: | (Modify) | List of entry IDs |
fieldList: | (Modify) | List of field tokens for each field |
entry: | (Modify) | Current entry |
Returns
Description
Stores data for current entry in memory by appending to lists
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Write the entryname index file using data from the entry sort file.
Synopsis
Prototype
ajuint embDbiSortWriteEntry (
AjPFile entFile,
ajuint maxidlen,
const AjPStr dbname,
ajuint nfiles,
AjBool cleanup,
const AjPStr sortopt
);
Type | Name | Read/Write | Description |
AjPFile | entFile | Modify | Entry file |
ajuint | maxidlen | Input | Maximum id length |
const AjPStr | dbname | Input | Database name (used in temp file names) |
ajuint | nfiles | Input | Number of files |
AjBool | cleanup | Input | Cleanup temp files if true |
const AjPStr | sortopt | Input | Sort commandline options |
ajuint | | RETURN | Number of entries |
Input
maxidlen: | (Input) | Maximum id length |
dbname: | (Input) | Database name (used in temp file names) |
nfiles: | (Input) | Number of files |
cleanup: | (Input) | Cleanup temp files if true |
sortopt: | (Input) | Sort commandline options |
Input & Output
entFile: | (Modify) | Entry file |
Returns
Description
Write the entryname index file using data from the entry sort file.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Write entryname index for in-memory processing
Synopsis
Prototype
ajuint embDbiMemWriteEntry (
AjPFile entFile,
ajuint maxidlen,
const AjPList idlist,
void*** ids
);
Type | Name | Read/Write | Description |
AjPFile | entFile | Modify | entryname index file |
ajuint | maxidlen | Input | Maximum entry id length |
const AjPList | idlist | Input | List of entry IDs to be written |
void*** | ids | Output | AjPStr* array of IDs from list |
ajuint | | RETURN | Number of entries written (excluding duplicates) |
Input
maxidlen: | (Input) | Maximum entry id length |
idlist: | (Input) | List of entry IDs to be written |
Output
ids: | (Output) | AjPStr* array of IDs from list |
Input & Output
entFile: | (Modify) | entryname index file |
Returns
ajuint: | Number of entries written (excluding duplicates) |
Description
Write entryname index for in-memory processing
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Write the indices for a field.
Synopsis
Prototype
ajuint embDbiSortWriteFields (
const AjPStr dbname,
const AjPStr release,
const char[4] date,
const AjPStr indexdir,
const AjPStr fieldname,
ajuint maxFieldLen,
ajuint nfiles,
ajuint nentries,
AjBool cleanup,
const AjPStr sortopt
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name (used for temp file names) |
const AjPStr | release | Input | Release number as a string |
const char[4] | date | Input | Date |
const AjPStr | indexdir | Input | Index directory |
const AjPStr | fieldname | Input | Field name (used for temp file names) |
ajuint | maxFieldLen | Input | Maximum field token length |
ajuint | nfiles | Input | Number of data files |
ajuint | nentries | Input | Number of entries |
AjBool | cleanup | Input | Cleanup temp files if true |
const AjPStr | sortopt | Input | Sort command line options |
ajuint | | RETURN | Number of unique field targets written |
Input
dbname: | (Input) | Database name (used for temp file names) |
release: | (Input) | Release number as a string |
date: | (Input) | Date |
indexdir: | (Input) | Index directory |
fieldname: | (Input) | Field name (used for temp file names) |
maxFieldLen: | (Input) | Maximum field token length |
nfiles: | (Input) | Number of data files |
nentries: | (Input) | Number of entries |
cleanup: | (Input) | Cleanup temp files if true |
sortopt: | (Input) | Sort command line options |
Returns
ajuint: | Number of unique field targets written |
Description
Write the indices for a field.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Write the fields indices
Synopsis
Prototype
ajuint embDbiMemWriteFields (
const AjPStr dbname,
const AjPStr release,
const char[4] date,
const AjPStr indexdir,
const AjPStr fieldname,
ajuint maxFieldLen,
const AjPList fieldList,
void** ids
);
Type | Name | Read/Write | Description |
const AjPStr | dbname | Input | Database name (used for temp file names) |
const AjPStr | release | Input | Release number as a string |
const char[4] | date | Input | Date |
const AjPStr | indexdir | Input | Index directory |
const AjPStr | fieldname | Input | Field name (used for file names) |
ajuint | maxFieldLen | Input | Maximum field token length |
const AjPList | fieldList | Input | List of field tokens to be written |
void** | ids | Input | AjPStr* array offield token s from list |
ajuint | | RETURN | Number of unique field targets written |
Input
dbname: | (Input) | Database name (used for temp file names) |
release: | (Input) | Release number as a string |
date: | (Input) | Date |
indexdir: | (Input) | Index directory |
fieldname: | (Input) | Field name (used for file names) |
maxFieldLen: | (Input) | Maximum field token length |
fieldList: | (Input) | List of field tokens to be written |
ids: | (Input) | AjPStr* array offield token s from list |
Returns
ajuint: | Number of unique field targets written |
Description
Write the fields indices
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Sets the date as an integer array from a formatted string.
The integer array is the internal format in database index headers
Synopsis
Prototype
void embDbiDateSet (
const AjPStr datestr,
char[4] date
);
Type | Name | Read/Write | Description |
const AjPStr | datestr | Input | Date as a string |
char[4] | date | Output | Data char (1 byte int) array |
void | | RETURN | |
Input
datestr: | (Input) | Date as a string |
Output
date: | (Output) | Data char (1 byte int) array |
Returns
Description
Sets the date as an integer array from a formatted string.
The integer array is the internal format in database index headers
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Compares a string to a maximum string length.
A negative maximum length limits the string to that absolute length.
A non-negative length is updated if the string is longer
Synopsis
Prototype
void embDbiMaxlen (
AjPStr* token,
ajint* maxlen
);
Type | Name | Read/Write | Description |
AjPStr* | token | Modify | Token string |
ajint* | maxlen | Modify | Maximum string length |
void | | RETURN | |
Input & Output
token: | (Modify) | Token string |
maxlen: | (Modify) | Maximum string length |
Returns
Description
Compares a string to a maximum string length.
A negative maximum length limits the string to that absolute length.
A non-negative length is updated if the string is longer
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes the header to a database indexing logfile
Synopsis
Prototype
void embDbiLogHeader (
AjPFile logfile,
const AjPStr dbname,
const AjPStr release,
const AjPStr datestr,
const AjPStr indexdir,
ajuint maxindex
);
Type | Name | Read/Write | Description |
AjPFile | logfile | Modify | Log file |
const AjPStr | dbname | Input | Database name |
const AjPStr | release | Input | Release number, name or code |
const AjPStr | datestr | Input | Indexing date as a string dd/mm/yy |
const AjPStr | indexdir | Input | Index directory relative path |
ajuint | maxindex | Input | Maximum index token length (usually zero) |
void | | RETURN | |
Input
dbname: | (Input) | Database name |
release: | (Input) | Release number, name or code |
datestr: | (Input) | Indexing date as a string dd/mm/yy |
indexdir: | (Input) | Index directory relative path |
maxindex: | (Input) | Maximum index token length (usually zero) |
Input & Output
Returns
Description
Writes the header to a database indexing logfile
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes database indexing logfile report of fields selected for indexing
Synopsis
Prototype
void embDbiLogFields (
AjPFile logfile,
AjPStr const* fields,
ajuint nfields
);
Type | Name | Read/Write | Description |
AjPFile | logfile | Modify | Log file |
AjPStr const* | fields | Input | Field names |
ajuint | nfields | Input | Number of fields |
void | | RETURN | |
Input
fields: | (Input) | Field names |
nfields: | (Input) | Number of fields |
Input & Output
Returns
Description
Writes database indexing logfile report of fields selected for indexing
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes database indexing logfile report of source data selected for indexing
Synopsis
Prototype
void embDbiLogSource (
AjPFile logfile,
const AjPStr directory,
const AjPStr filename,
const AjPStr exclude,
AjPStr const* inputFiles,
ajuint nfiles
);
Type | Name | Read/Write | Description |
AjPFile | logfile | Modify | Log file |
const AjPStr | directory | Input | Data directory relative path |
const AjPStr | filename | Input | Selected filenames wildcard |
const AjPStr | exclude | Input | Excluded filenames wildcard |
AjPStr const* | inputFiles | Input | File names |
ajuint | nfiles | Input | Number of files |
void | | RETURN | |
Input
directory: | (Input) | Data directory relative path |
filename: | (Input) | Selected filenames wildcard |
exclude: | (Input) | Excluded filenames wildcard |
inputFiles: | (Input) | File names |
nfiles: | (Input) | Number of files |
Input & Output
Returns
Description
Writes database indexing logfile report of source data selected for indexing
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes database indexing logfile report of commandline used
Synopsis
Prototype
void embDbiLogCmdline (
AjPFile logfile
);
Type | Name | Read/Write | Description |
AjPFile | logfile | Modify | Log file |
void | | RETURN | |
Input & Output
Returns
Description
Writes database indexing logfile report of commandline used
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes database indexing logfile report of a single source file
Synopsis
Prototype
void embDbiLogFile (
AjPFile logfile,
const AjPStr curfilename,
ajuint idCountFile,
AjPStr const* fields,
const ajuint* countField,
ajuint nfields
);
Type | Name | Read/Write | Description |
AjPFile | logfile | Modify | Log file |
const AjPStr | curfilename | Input | Source filename |
ajuint | idCountFile | Input | Number of IDs in file |
AjPStr const* | fields | Input | Field names |
const ajuint* | countField | Input | Number of field tokens in this file |
ajuint | nfields | Input | Number of fields |
void | | RETURN | |
Input
curfilename: | (Input) | Source filename |
idCountFile: | (Input) | Number of IDs in file |
fields: | (Input) | Field names |
countField: | (Input) | Number of field tokens in this file |
nfields: | (Input) | Number of fields |
Input & Output
Returns
Description
Writes database indexing logfile report of a single source file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Writes database indexing logfile report of final totals
Synopsis
Prototype
void embDbiLogFinal (
AjPFile logfile,
ajuint maxindex,
const ajint* maxFieldLen,
AjPStr const* fields,
const ajuint* fieldTot,
ajuint nfields,
ajuint nfiles,
ajuint idDone,
ajuint idCount
);
Type | Name | Read/Write | Description |
AjPFile | logfile | Modify | Log file |
ajuint | maxindex | Input | User defined maximum index token length
(usually zero) |
const ajint* | maxFieldLen | Input | Maximum index token length
for each field. Negative values
were upper limits. Positive values
are the maximum in the data |
AjPStr const* | fields | Input | Field names |
const ajuint* | fieldTot | Input | Number of unique field tokens |
ajuint | nfields | Input | Number of fields |
ajuint | nfiles | Input | Number of input files |
ajuint | idDone | Input | Number of unique IDs indexed |
ajuint | idCount | Input | Total number of IDs indexed |
void | | RETURN | |
Input
maxindex: | (Input) | User defined maximum index token length
(usually zero) |
maxFieldLen: | (Input) | Maximum index token length
for each field. Negative values
were upper limits. Positive values
are the maximum in the data |
fields: | (Input) | Field names |
fieldTot: | (Input) | Number of unique field tokens |
nfields: | (Input) | Number of fields |
nfiles: | (Input) | Number of input files |
idDone: | (Input) | Number of unique IDs indexed |
idCount: | (Input) | Total number of IDs indexed |
Input & Output
Returns
Description
Writes database indexing logfile report of final totals
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0
Cleanup database indexing internals on exit
Synopsis
Prototype
void embDbiExit (
void
);
Type | Name | Read/Write | Description |
void | | RETURN | |
Returns
Description
Cleanup database indexing internals on exit
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 6.4.0