- }
- fi = file_read_start (fd);
- do
- {
- file_begin (fi);
- r = recordExtract (zh, sysno, fname, rGroup, deleteFlag, fi,
- recType, subType, clientData);
- } while (r && !sysno && fi->file_more);
- file_read_stop (fi);
- if (fd != -1)
- close (fd);
- return r;
-}
-int extract_rec_in_mem (ZebraHandle zh, const char *recordType,
- const char *buf, size_t buf_size,
- const char *databaseName, int delete_flag,
- int test_mode, int *sysno,
- int store_keys, int store_data,
- const char *match_criteria)
-{
- struct recordGroup rGroup;
- rGroup.groupName = NULL;
- rGroup.databaseName = (char *)databaseName;
- rGroup.path = NULL;
- rGroup.recordId = NULL;
- rGroup.recordType = (char *)recordType;
- rGroup.flagStoreData = store_data;
- rGroup.flagStoreKeys = store_keys;
- rGroup.flagRw = 1;
- rGroup.databaseNamePath = 0;
- rGroup.explainDatabase = 0;
- rGroup.fileVerboseLimit = 100000;
- rGroup.followLinks = -1;
- return (bufferExtractRecord (zh,
- buf, buf_size,
- &rGroup,
- delete_flag,
- test_mode,
- recordType,
- sysno,
- match_criteria,
- "<no file>"));
-}
-/*
- If sysno is provided, then it's used to identify the reocord.
- If not, and match_criteria is provided, then sysno is guessed
- If not, and a record is provided, then sysno is got from there
-
- */
-int bufferExtractRecord (ZebraHandle zh,
- const char *buf, size_t buf_size,
- struct recordGroup *rGroup,
- int delete_flag,
- int test_mode,
- const char *recordType,
- int *sysno,
- const char *match_criteria,
- const char *fname)