MCPcopy Create free account
hub / github.com/bcndev/bytecoin / get_approximate_items_count

Method get_approximate_items_count

src/platform/DBsqlite3.cpp:113–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111size_t DBsqliteKV::test_get_approximate_size() const { return 0; }
112
113size_t DBsqliteKV::get_approximate_items_count() const {
114 return std::numeric_limits<size_t>::
115 max(); // Sqlite does full table scan on select count(*), we do not want that behavior
116 // sqlite3_reset(stmt_select_star.handle);
117 // auto rc = sqlite3_step(stmt_select_star.handle);
118 // if (rc != SQLITE_ROW)
119 // throw platform::sqlite::Error("DB::get_approximate_items_count failed sqlite3_step in get " +
120 // common::to_string(rc));
121 // return common::integer_cast<size_t>(sqlite3_column_int64(stmt_select_star.handle, 0));
122}
123
124static const size_t max_key_size = 255;
125

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected