::psg::retrieval::BioseqInfoKey
info;
104vector<CSI2CSIRecord> response;
118 while(has_current) {
119 intsec_seq_it_type{-1};
122|| sec_seqid.compare(
key.data<
const char>()) != 0
126has_current =
UnpackKey(
key.data<
const char>(),
key.size(), sec_seq_it_type);
127 if(has_current && (!with_type || sec_seq_it_type == request.
GetSecSeqIdType())) {
128response.resize(response.size() + 1);
129 auto& last_record = response[response.size() - 1];
131.SetSecSeqId(sec_seqid)
132.SetSecSeqIdType(sec_seq_it_type);
135response.resize(response.size() - 1);
147vector<CSI2CSIRecord> response;
153 while(has_current) {
154 intsec_seq_it_type{-1};
156 if(
UnpackKey(
key.data<
const char>(),
key.size(), sec_seqid, sec_seq_it_type)) {
157response.resize(response.size() + 1);
158 auto& last_record = response[response.size() - 1];
160.SetSecSeqId(sec_seqid)
161.SetSecSeqIdType(sec_seq_it_type);
164response.resize(response.size() - 1);
#define BEGIN_IDBLOB_SCOPE
unique_ptr< lmdb::env > m_Env
CLMDBReadOnlyTxn BeginReadTxn()
void Pack(string &value, TInt bytes) const
static string PackKey(const string &sec_seqid, int sec_seq_id_type)
vector< CSI2CSIRecord > Fetch(CSi2CsiFetchRequest const &request)
bool x_ExtractRecord(CSI2CSIRecord &record, lmdb::val const &value) const
vector< CSI2CSIRecord > FetchLast()
unique_ptr< lmdb::dbi, function< void(lmdb::dbi *)> > m_Dbi
~CPubseqGatewayCacheSi2Csi() override
static bool UnpackKey(const char *key, size_t key_sz, int &sec_seq_id_type)
TInt Unpack(const char *key) const
CSI2CSIRecord & SetSeqIdType(TSeqIdType value)
CSI2CSIRecord & SetGI(TGI value)
CSI2CSIRecord & SetAccession(const TAccession &value)
CSI2CSIRecord & SetVersion(TVersion value)
CSI2CSIRecord::TSecSeqIdType GetSecSeqIdType() const
CSI2CSIRecord::TSecSeqId GetSecSeqId() const
bool HasField(EFields field) const
static cursor open(MDB_txn *const txn, const MDB_dbi dbi)
Creates an LMDB cursor.
Resource class for `MDB_dbi` handles.
void close(MDB_env *const env)
Closes DB handle.
static dbi open(MDB_txn *const txn, const char *const name=nullptr, const unsigned int flags=default_flags)
Opens a database handle.
Wrapper class for `MDB_val` structures.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
@ MDB_LAST
Position at last key/data item.
@ MDB_NEXT
Position at next data item.
@ MDB_SET_RANGE
Position at first key greater than or equal to specified key.
@ MDB_GET_CURRENT
Return key/data at current cursor position.
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
static const unsigned kPackedSeqIdTypeSz
static const unsigned kPackedKeyZero
CPubseqGatewayCacheUnpackBytes TUnpackBytes
BEGIN_IDBLOB_SCOPE USING_NCBI_SCOPE
size_t PackedKeySize(size_t acc_sz)
CPubseqGatewayCachePackBytes TPackBytes
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4