43 {
"accession",
"accession"},
44 {
"assembly",
"assembly"},
45 {
"product_name",
"product_name"},
46 {
"nuc_accession",
"nuc_accession"},
50 {
"src_refseq",
"src_refseq"},
54 {
"gb_state",
"gb_state"},
55 {
"weights",
"weights"},
56 {
"bioproject",
"bioproject"},
57 {
"compartment",
"compartment"},
58 {
"updated",
"updated"},
59 {
"created",
"created"},
61 {
"pubmedids",
"pubmedids"},
62 {
"def_line",
"def_line"},
63 {
"write_time",
"writetime(gb_state)"},
70 if (field.first == field_name) {
82 field_list.append(item.second).append(
", ");
84 if (!field_list.empty()) {
85 field_list.resize(field_list.size() - 2);
108 objects::CBioSource::eGenome_unknown :
109 static_cast<objects::CBioSource::EGenome
>(
query->FieldGetInt32Value(
FieldIndex(
"compartment")))
117 CTime writetime(writetime_mc/1000000);
135 list<string> src_refseq;
136 query->FieldGetContainerValue(
FieldIndex(
"src_refseq"), back_inserter(src_refseq));
142 query->FieldGetContainerValue(
FieldIndex(
"weights"), back_inserter(weights));
153 query->FieldGetTupleValue<tuple<TCdsValue, TCdsValue, TCdsValue>>(
FieldIndex(
"cds"))
164 const string & keyspace,
170 :
CCassBlobWaiter(std::move(connection), keyspace, async, std::move(data_error_cb))
172 , m_ConsumeCallback(std::move(consume_callback))
198 "CPubseqGatewayFetchIpgReport: DataReadyCB can't be assigned "
199 "after the loading process has started");
221 m_QueryArr[0].query->SetSQL(
"SELECT ipg FROM " +
GetKeySpace() +
".accession_to_ipg WHERE accession = ?", 1);
226 }
else if (THugeHelper::HugeIpgEnabled()) {
274 string protein_suffix;
277 protein_suffix =
" AND accession = ?";
280 protein_suffix +=
" AND nuc_accession = ?";
284 +
" FROM " +
GetKeySpace() +
".ipg_report WHERE ipg = ?" + protein_suffix, args);
307 string protein_suffix;
310 protein_suffix =
" AND accession = ?";
313 protein_suffix +=
" AND nuc_accession = ?";
318 +
" FROM " +
GetKeySpace() +
".ipg_report_huge WHERE ipg = ? and subgroup = ?" + protein_suffix, args);
341 if (!new_item.IsValid()) {
391 snprintf(
msg,
sizeof(
msg),
392 "Failed to fetch blob (key=%s.%d) unexpected state (%d)",
function< void(CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)> TDataErrorCallback
void remove_if(Container &c, Predicate *__pred)
atomic< int32_t > m_State
string GetKeySpace() const
void SetDataReadyCB3(shared_ptr< CCassDataCallbackReceiver > datareadycb3)
void SetupQueryCB3(shared_ptr< CCassQuery > &query)
bool CheckReady(shared_ptr< CCassQuery > qry, unsigned int restart_counter, bool &need_repeat)
vector< SQueryRec > m_QueryArr
shared_ptr< CCassQuery > ProduceQuery() const
void Error(CRequestStatus::ECode status, int code, EDiagSev severity, const string &message)
string GetProtein() const
string GetNucleotide() const
CPubseqGatewayFetchIpgReportRequest & SetResolvedIpg(TIpg value)
TIpg HasIpgToFetchData() const
TIpg GetIpgToFetchData() const
bool HasNucleotide() const
SIpgSubgroupsConfig m_Subgroups
@ eTaskFetchReportStarted
@ eTaskAccessionResolutionStarted
@ eTaskCheckHugeIpgStarted
void SetConsumeCallback(CPubseqGatewayIpgReportConsumeCallback callback)
CPubseqGatewayIpgReportConsumeCallback m_ConsumeCallback
void SetPageSize(unsigned int value)
CassConsistency m_Consistency
vector< CIpgStorageReportEntry > m_Container
static const size_t kReadBufferReserveDefault
virtual ~CPubseqGatewayFetchIpgReport()
string m_LastNucAccession
CPubseqGatewayFetchIpgReportRequest m_Request
EIpgSubgroupsStatus m_SubgroupsStatusOverride
void SetDataReadyCB(shared_ptr< CCassDataCallbackReceiver > callback)
SIpgSubgroupsConfig::TCIterator m_SubgroupItr
void SetConsistency(CassConsistency value)
const_iterator end() const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static constexpr array< pair< const char *, const char * >, 22 > ipg_report_fields
constexpr int FieldIndex(const char *field_name)
string GetSelectFieldList()
void PopulateEntry(shared_ptr< CCassQuery > &query, CIpgStorageReportEntry &entry)
#define TAX_ID_FROM(T, value)
@ eDiag_Error
Error message.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
CTime & ToLocalTime(void)
Convert the time into local time.
void SetMicroSecond(long microsecond)
Set microseconds.
function< bool(vector< CIpgStorageReportEntry > &&, bool is_last)> CPubseqGatewayIpgReportConsumeCallback
vector< double > TIpgWeights
const GenericPointer< typename T::ValueType > T2 value
Defines: CTimeFormat - storage class for time format.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
CIpgStorageReportEntry & SetDefLine(string const &defline)
CIpgStorageReportEntry & SetDiv(string const &value)
CIpgStorageReportEntry & SetProductName(string const &value)
CIpgStorageReportEntry & SetIpg(TIpg value)
CIpgStorageReportEntry & SetGenome(objects::CBioSource::EGenome value)
CIpgStorageReportEntry & SetNucAccession(string const &value)
CIpgStorageReportEntry & SetBioProject(string const &value)
CIpgStorageReportEntry & SetWriteTime(CTime value)
CIpgStorageReportEntry & SetTaxid(TTaxId value)
CIpgStorageReportEntry & SetWeights(TIpgWeights &&value)
CIpgStorageReportEntry & SetUpdated(CTime value)
CIpgStorageReportEntry & SetAssembly(string const &value)
CIpgStorageReportEntry & SetStrain(string const &value)
CIpgStorageReportEntry & SetPubMedIds(TPubMedIds &&ids)
CIpgStorageReportEntry & SetFlags(Int4 value)
CIpgStorageReportEntry & SetCds(TIpgCds value)
string const & GetAccession() const
CIpgStorageReportEntry & SetAccession(string const &value)
CIpgStorageReportEntry & SetCreated(CTime value)
CIpgStorageReportEntry & SetRefseq(list< string > const &value)
CIpgStorageReportEntry & SetLength(Int4 value)
CIpgStorageReportEntry & SetGbState(TGbState value)
CIpgStorageReportEntry & SetSrcDb(Int4 value)
string const & GetNucAccession() const
EIpgSubgroupsStatus status
vector< int32_t > subgroups
@ NCBI_gb_state_eWGSGenBankMissing