CatalogsDB::SqlStatements
Functions | |
QString | all_catalog_view_body (const QString &fields, const QString &cat_prefix, int id) |
const QString | create_catalog_registry (const QString &name) |
QString | create_catalog_table (int id) |
template<typename input_iterator > | |
QString | create_field_list (input_iterator begin, input_iterator end) |
template<typename input_iterator > | |
QString | create_field_list (input_iterator begin, input_iterator end, const QString &prefix) |
template<typename input_iterator > | |
QString | create_update_list (input_iterator begin, input_iterator end) |
const QString | drop_catalog (int id) |
const QString | dso_by_catalog (int catalog_id) |
const QString | dso_by_name_and_catalog (const int id) |
const QString | dso_by_oid_and_catalog (const int id) |
const QString | dso_by_wildcard () |
const QString | dso_count_by_type (int catalog_id) |
const QString | dso_general_query (const QString &where, const QString &order_by="") |
const QString | dso_in_catalog_by_maglim (const int id) |
template<typename input_iterator > | |
QStringList | from_it (input_iterator begin, input_iterator end) |
const QString | insert_dso (int catalog_id) |
const QString | insert_into_catalog_registry (const QString &name) |
const QString | move_objects (const int id_1, const int id_2) |
const QString | remove_dso (const int id) |
const QString | set_catalog_all_objects (const int id) |
Variables | |
const QString | _all_catalog_view_body |
constexpr std::array< const char *, 8 > | _catalog_meta_fields |
const QString | _create_catalog_list_table |
const QString | _create_catalog_table |
const QString | _create_master |
const QString | _drop_catalog = "DROP TABLE cat_%1" |
const QString | _dso_by_catalog = QString("SELECT %1 FROM cat_%2").arg(catalog_fields) |
const QString | _dso_by_lim |
const QString | _dso_by_maglim |
const QString | _dso_by_maglim_and_type |
const QString | _dso_by_name |
const QString | _dso_by_name_exact = "SELECT %1 FROM master WHERE name = :name LIMIT 1" |
const QString | _dso_by_oid = "SELECT %1 FROM master WHERE oid = :id LIMIT 1" |
const QString | _dso_by_trixel |
const QString | _dso_by_trixel_no_nulls |
const QString | _dso_by_trixel_null_mag |
const QString | _dso_by_wildcard |
const QString | _dso_count_by_type = "SELECT type, COUNT(*) FROM %1 GROUP BY type" |
const QString | _insert_catalog |
const QString | _insert_dso |
const QString | _insert_dso_template = "INSERT OR REPLACE INTO cat_%3 (%1) VALUES (%2)" |
const QString | _remove_dso { "DELETE FROM cat_%1 WHERE oid = :oid" } |
const QString | all_catalog_view = "all_catalogs" |
constexpr std::array< const char *, 15 > | catalog_collumns |
const auto | catalog_fields |
const QString | catalog_prefix = "cat_" |
const QString | colors_table = "catalog_colors" |
const QString | create_catalog_list_table = create_catalog_registry("catalogs") |
const QString | create_colors_table |
const QString | create_master = QString(_create_master).arg(master_catalog_fields) |
const QString | create_master_mag_index |
const QString | create_master_name_index |
const QString | create_master_trixel_index |
const QString | create_master_type_index |
const QString | create_meta_table |
constexpr int | current_db_version = 3 |
constexpr int | default_htmesh_level = 3 |
const QString | drop_master = "DROP TABLE IF EXISTS master" |
const QString | dso_by_lim = QString(_dso_by_lim).arg(object_fields).arg(mag_asc) |
const QString | dso_by_maglim = QString(_dso_by_maglim).arg(object_fields).arg(mag_asc) |
const QString | dso_by_maglim_and_type |
const QString | dso_by_name = QString(_dso_by_name).arg(object_fields).arg(mag_asc) |
const QString | dso_by_name_exact = QString(_dso_by_name_exact).arg(object_fields) |
const QString | dso_by_oid = QString(_dso_by_oid).arg(object_fields) |
const QString | dso_by_trixel = QString(_dso_by_trixel).arg(object_fields).arg(mag_desc) |
const QString | dso_by_trixel_no_nulls = QString(_dso_by_trixel_no_nulls).arg(object_fields) |
const QString | dso_by_trixel_null_mag = QString(_dso_by_trixel_null_mag).arg(object_fields) |
const QString | dso_count_by_type_master = _dso_count_by_type.arg("master") |
constexpr std::array< const char *, 13 > | dso_query_fields |
const QString | empty_view = "SELECT NULL WHERE FALSE" |
const QString | enable_disable_catalog |
const QString | exists_catalog_by_id = "SELECT 1 FROM catalogs WHERE id = :id" |
const QString | exists_master |
const QString | get_all_catalog_ids = "SELECT id FROM catalogs ORDER BY id ASC" |
const QString | get_catalog_by_id |
const QString | get_catalog_ids |
const QString | get_colors |
const QString | get_first_catalog |
const QString | get_meta = "SELECT version, htmesh_level, init FROM meta LIMIT 1" |
const QString | insert_catalog = insert_into_catalog_registry("catalogs") |
const QString | insert_color |
const QString | mag_asc = "magnitude IS NOT NULL, magnitude ASC" |
const QString | mag_desc = "magnitude IS NULL, magnitude DESC" |
const QString | master_catalog = "master" |
constexpr std::array< const char *, 14 > | master_catalog_collumns |
const auto | master_catalog_fields |
const auto | object_fields |
const QString | remove_catalog = "DELETE FROM catalogs WHERE id = :id" |
const QString | set_meta |
const QString | update_catalog_meta |
const QString | update_version = "UPDATE meta SET version = :version" |
constexpr int | user_catalog_id = 0 |
const QString | user_catalog_name = "user" |
Detailed Description
Holds a collection of hardcoded sql statements.
Function Documentation
◆ all_catalog_view_body()
|
inline |
Definition at line 173 of file catalogsdb/sqlstatements.cpp.
◆ create_catalog_registry()
Definition at line 197 of file catalogsdb/sqlstatements.cpp.
◆ create_catalog_table()
|
inline |
Definition at line 273 of file catalogsdb/sqlstatements.cpp.
◆ create_field_list() [1/2]
QString CatalogsDB::SqlStatements::create_field_list | ( | input_iterator | begin, |
input_iterator | end ) |
Definition at line 76 of file catalogsdb/sqlstatements.cpp.
◆ create_field_list() [2/2]
QString CatalogsDB::SqlStatements::create_field_list | ( | input_iterator | begin, |
input_iterator | end, | ||
const QString & | prefix ) |
Definition at line 84 of file catalogsdb/sqlstatements.cpp.
◆ create_update_list()
|
inline |
Definition at line 216 of file catalogsdb/sqlstatements.cpp.
◆ drop_catalog()
|
inline |
Definition at line 244 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_catalog()
|
inline |
Definition at line 317 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_name_and_catalog()
|
inline |
Definition at line 361 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_oid_and_catalog()
|
inline |
Definition at line 342 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_wildcard()
|
inline |
Definition at line 374 of file catalogsdb/sqlstatements.cpp.
◆ dso_count_by_type()
|
inline |
Definition at line 420 of file catalogsdb/sqlstatements.cpp.
◆ dso_general_query()
|
inline |
Definition at line 379 of file catalogsdb/sqlstatements.cpp.
◆ dso_in_catalog_by_maglim()
|
inline |
Definition at line 401 of file catalogsdb/sqlstatements.cpp.
◆ from_it()
QStringList CatalogsDB::SqlStatements::from_it | ( | input_iterator | begin, |
input_iterator | end ) |
Definition at line 65 of file catalogsdb/sqlstatements.cpp.
◆ insert_dso()
|
inline |
Definition at line 431 of file catalogsdb/sqlstatements.cpp.
◆ insert_into_catalog_registry()
|
inline |
Definition at line 210 of file catalogsdb/sqlstatements.cpp.
◆ move_objects()
|
inline |
Definition at line 158 of file catalogsdb/sqlstatements.cpp.
◆ remove_dso()
|
inline |
Definition at line 437 of file catalogsdb/sqlstatements.cpp.
◆ set_catalog_all_objects()
|
inline |
Definition at line 163 of file catalogsdb/sqlstatements.cpp.
Variable Documentation
◆ _all_catalog_view_body
const QString CatalogsDB::SqlStatements::_all_catalog_view_body |
Definition at line 169 of file catalogsdb/sqlstatements.cpp.
◆ _catalog_meta_fields
|
constexpr |
Definition at line 230 of file catalogsdb/sqlstatements.cpp.
◆ _create_catalog_list_table
const QString CatalogsDB::SqlStatements::_create_catalog_list_table |
Definition at line 182 of file catalogsdb/sqlstatements.cpp.
◆ _create_catalog_table
const QString CatalogsDB::SqlStatements::_create_catalog_table |
Definition at line 249 of file catalogsdb/sqlstatements.cpp.
◆ _create_master
const QString CatalogsDB::SqlStatements::_create_master |
Definition at line 281 of file catalogsdb/sqlstatements.cpp.
◆ _drop_catalog
const QString CatalogsDB::SqlStatements::_drop_catalog = "DROP TABLE cat_%1" |
Definition at line 243 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_catalog
const QString CatalogsDB::SqlStatements::_dso_by_catalog = QString("SELECT %1 FROM cat_%2").arg(catalog_fields) |
Definition at line 316 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_lim
const QString CatalogsDB::SqlStatements::_dso_by_lim |
Definition at line 396 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_maglim
const QString CatalogsDB::SqlStatements::_dso_by_maglim |
Definition at line 391 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_maglim_and_type
const QString CatalogsDB::SqlStatements::_dso_by_maglim_and_type |
Definition at line 410 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_name
const QString CatalogsDB::SqlStatements::_dso_by_name |
Definition at line 349 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_name_exact
const QString CatalogsDB::SqlStatements::_dso_by_name_exact = "SELECT %1 FROM master WHERE name = :name LIMIT 1" |
Definition at line 356 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_oid
const QString CatalogsDB::SqlStatements::_dso_by_oid = "SELECT %1 FROM master WHERE oid = :id LIMIT 1" |
Definition at line 338 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_trixel
const QString CatalogsDB::SqlStatements::_dso_by_trixel |
Definition at line 324 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_trixel_no_nulls
const QString CatalogsDB::SqlStatements::_dso_by_trixel_no_nulls |
Definition at line 333 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_trixel_null_mag
const QString CatalogsDB::SqlStatements::_dso_by_trixel_null_mag |
Definition at line 329 of file catalogsdb/sqlstatements.cpp.
◆ _dso_by_wildcard
const QString CatalogsDB::SqlStatements::_dso_by_wildcard |
Definition at line 371 of file catalogsdb/sqlstatements.cpp.
◆ _dso_count_by_type
const QString CatalogsDB::SqlStatements::_dso_count_by_type = "SELECT type, COUNT(*) FROM %1 GROUP BY type" |
Definition at line 417 of file catalogsdb/sqlstatements.cpp.
◆ _insert_catalog
const QString CatalogsDB::SqlStatements::_insert_catalog |
Definition at line 204 of file catalogsdb/sqlstatements.cpp.
◆ _insert_dso
const QString CatalogsDB::SqlStatements::_insert_dso |
Definition at line 426 of file catalogsdb/sqlstatements.cpp.
◆ _insert_dso_template
const QString CatalogsDB::SqlStatements::_insert_dso_template = "INSERT OR REPLACE INTO cat_%3 (%1) VALUES (%2)" |
Definition at line 425 of file catalogsdb/sqlstatements.cpp.
◆ _remove_dso
const QString CatalogsDB::SqlStatements::_remove_dso { "DELETE FROM cat_%1 WHERE oid = :oid" } |
Definition at line 436 of file catalogsdb/sqlstatements.cpp.
◆ all_catalog_view
const QString CatalogsDB::SqlStatements::all_catalog_view = "all_catalogs" |
Definition at line 35 of file catalogsdb/sqlstatements.cpp.
◆ catalog_collumns
|
constexpr |
Definition at line 98 of file catalogsdb/sqlstatements.cpp.
◆ catalog_fields
const auto CatalogsDB::SqlStatements::catalog_fields |
Definition at line 107 of file catalogsdb/sqlstatements.cpp.
◆ catalog_prefix
const QString CatalogsDB::SqlStatements::catalog_prefix = "cat_" |
Definition at line 29 of file catalogsdb/sqlstatements.cpp.
◆ colors_table
const QString CatalogsDB::SqlStatements::colors_table = "catalog_colors" |
Definition at line 36 of file catalogsdb/sqlstatements.cpp.
◆ create_catalog_list_table
const QString CatalogsDB::SqlStatements::create_catalog_list_table = create_catalog_registry("catalogs") |
Definition at line 202 of file catalogsdb/sqlstatements.cpp.
◆ create_colors_table
const QString CatalogsDB::SqlStatements::create_colors_table |
Definition at line 49 of file catalogsdb/sqlstatements.cpp.
◆ create_master
const QString CatalogsDB::SqlStatements::create_master = QString(_create_master).arg(master_catalog_fields) |
Definition at line 287 of file catalogsdb/sqlstatements.cpp.
◆ create_master_mag_index
const QString CatalogsDB::SqlStatements::create_master_mag_index |
Definition at line 293 of file catalogsdb/sqlstatements.cpp.
◆ create_master_name_index
const QString CatalogsDB::SqlStatements::create_master_name_index |
Definition at line 297 of file catalogsdb/sqlstatements.cpp.
◆ create_master_trixel_index
const QString CatalogsDB::SqlStatements::create_master_trixel_index |
Definition at line 289 of file catalogsdb/sqlstatements.cpp.
◆ create_master_type_index
const QString CatalogsDB::SqlStatements::create_master_type_index |
Definition at line 295 of file catalogsdb/sqlstatements.cpp.
◆ create_meta_table
const QString CatalogsDB::SqlStatements::create_meta_table |
Definition at line 39 of file catalogsdb/sqlstatements.cpp.
◆ current_db_version
|
constexpr |
Definition at line 30 of file catalogsdb/sqlstatements.cpp.
◆ default_htmesh_level
|
constexpr |
Definition at line 31 of file catalogsdb/sqlstatements.cpp.
◆ drop_master
const QString CatalogsDB::SqlStatements::drop_master = "DROP TABLE IF EXISTS master" |
Definition at line 279 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_lim
const QString CatalogsDB::SqlStatements::dso_by_lim = QString(_dso_by_lim).arg(object_fields).arg(mag_asc) |
Definition at line 399 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_maglim
const QString CatalogsDB::SqlStatements::dso_by_maglim = QString(_dso_by_maglim).arg(object_fields).arg(mag_asc) |
Definition at line 394 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_maglim_and_type
const QString CatalogsDB::SqlStatements::dso_by_maglim_and_type |
Definition at line 414 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_name
const QString CatalogsDB::SqlStatements::dso_by_name = QString(_dso_by_name).arg(object_fields).arg(mag_asc) |
Definition at line 358 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_name_exact
const QString CatalogsDB::SqlStatements::dso_by_name_exact = QString(_dso_by_name_exact).arg(object_fields) |
Definition at line 359 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_oid
Definition at line 340 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_trixel
const QString CatalogsDB::SqlStatements::dso_by_trixel = QString(_dso_by_trixel).arg(object_fields).arg(mag_desc) |
Definition at line 327 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_trixel_no_nulls
const QString CatalogsDB::SqlStatements::dso_by_trixel_no_nulls = QString(_dso_by_trixel_no_nulls).arg(object_fields) |
Definition at line 336 of file catalogsdb/sqlstatements.cpp.
◆ dso_by_trixel_null_mag
const QString CatalogsDB::SqlStatements::dso_by_trixel_null_mag = QString(_dso_by_trixel_null_mag).arg(object_fields) |
Definition at line 331 of file catalogsdb/sqlstatements.cpp.
◆ dso_count_by_type_master
const QString CatalogsDB::SqlStatements::dso_count_by_type_master = _dso_count_by_type.arg("master") |
Definition at line 418 of file catalogsdb/sqlstatements.cpp.
◆ dso_query_fields
|
constexpr |
The standard fields to query when loading objects from the db into kstars.
Definition at line 133 of file catalogsdb/sqlstatements.cpp.
◆ empty_view
const QString CatalogsDB::SqlStatements::empty_view = "SELECT NULL WHERE FALSE" |
Definition at line 179 of file catalogsdb/sqlstatements.cpp.
◆ enable_disable_catalog
const QString CatalogsDB::SqlStatements::enable_disable_catalog |
Definition at line 155 of file catalogsdb/sqlstatements.cpp.
◆ exists_catalog_by_id
const QString CatalogsDB::SqlStatements::exists_catalog_by_id = "SELECT 1 FROM catalogs WHERE id = :id" |
Definition at line 310 of file catalogsdb/sqlstatements.cpp.
◆ exists_master
const QString CatalogsDB::SqlStatements::exists_master |
Definition at line 312 of file catalogsdb/sqlstatements.cpp.
◆ get_all_catalog_ids
const QString CatalogsDB::SqlStatements::get_all_catalog_ids = "SELECT id FROM catalogs ORDER BY id ASC" |
Definition at line 154 of file catalogsdb/sqlstatements.cpp.
◆ get_catalog_by_id
const QString CatalogsDB::SqlStatements::get_catalog_by_id |
Definition at line 306 of file catalogsdb/sqlstatements.cpp.
◆ get_catalog_ids
const QString CatalogsDB::SqlStatements::get_catalog_ids |
Definition at line 152 of file catalogsdb/sqlstatements.cpp.
◆ get_colors
const QString CatalogsDB::SqlStatements::get_colors |
Definition at line 55 of file catalogsdb/sqlstatements.cpp.
◆ get_first_catalog
const QString CatalogsDB::SqlStatements::get_first_catalog |
Definition at line 302 of file catalogsdb/sqlstatements.cpp.
◆ get_meta
const QString CatalogsDB::SqlStatements::get_meta = "SELECT version, htmesh_level, init FROM meta LIMIT 1" |
Definition at line 44 of file catalogsdb/sqlstatements.cpp.
◆ insert_catalog
const QString CatalogsDB::SqlStatements::insert_catalog = insert_into_catalog_registry("catalogs") |
Definition at line 241 of file catalogsdb/sqlstatements.cpp.
◆ insert_color
const QString CatalogsDB::SqlStatements::insert_color |
Definition at line 58 of file catalogsdb/sqlstatements.cpp.
◆ mag_asc
const QString CatalogsDB::SqlStatements::mag_asc = "magnitude IS NOT NULL, magnitude ASC" |
Definition at line 21 of file catalogsdb/sqlstatements.cpp.
◆ mag_desc
const QString CatalogsDB::SqlStatements::mag_desc = "magnitude IS NULL, magnitude DESC" |
Definition at line 22 of file catalogsdb/sqlstatements.cpp.
◆ master_catalog
const QString CatalogsDB::SqlStatements::master_catalog = "master" |
Definition at line 34 of file catalogsdb/sqlstatements.cpp.
◆ master_catalog_collumns
|
constexpr |
Definition at line 110 of file catalogsdb/sqlstatements.cpp.
◆ master_catalog_fields
const auto CatalogsDB::SqlStatements::master_catalog_fields |
Definition at line 126 of file catalogsdb/sqlstatements.cpp.
◆ object_fields
const auto CatalogsDB::SqlStatements::object_fields |
Definition at line 148 of file catalogsdb/sqlstatements.cpp.
◆ remove_catalog
const QString CatalogsDB::SqlStatements::remove_catalog = "DELETE FROM catalogs WHERE id = :id" |
Definition at line 242 of file catalogsdb/sqlstatements.cpp.
◆ set_meta
const QString CatalogsDB::SqlStatements::set_meta |
Definition at line 45 of file catalogsdb/sqlstatements.cpp.
◆ update_catalog_meta
const QString CatalogsDB::SqlStatements::update_catalog_meta |
Definition at line 236 of file catalogsdb/sqlstatements.cpp.
◆ update_version
const QString CatalogsDB::SqlStatements::update_version = "UPDATE meta SET version = :version" |
Definition at line 43 of file catalogsdb/sqlstatements.cpp.
◆ user_catalog_id
|
constexpr |
Definition at line 32 of file catalogsdb/sqlstatements.cpp.
◆ user_catalog_name
const QString CatalogsDB::SqlStatements::user_catalog_name = "user" |
Definition at line 33 of file catalogsdb/sqlstatements.cpp.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.