OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Catalog.cpp File Reference

Functions for database metadata access. More...

#include "Catalog/Catalog.h"
#include <algorithm>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/version.hpp>
#include <cassert>
#include <cerrno>
#include <cstdio>
#include <cstring>
#include <exception>
#include <fstream>
#include <list>
#include <memory>
#include <random>
#include <regex>
#include <sstream>
#include <boost/uuid/sha1.hpp>
#include <rapidjson/document.h>
#include <rapidjson/istreamwrapper.h>
#include <rapidjson/ostreamwrapper.h>
#include <rapidjson/writer.h>
#include "Catalog/SysCatalog.h"
#include "QueryEngine/Execute.h"
#include "QueryEngine/TableOptimizer.h"
#include "DataMgr/FileMgr/FileMgr.h"
#include "DataMgr/FileMgr/GlobalFileMgr.h"
#include "DataMgr/ForeignStorage/AbstractFileStorageDataWrapper.h"
#include "DataMgr/ForeignStorage/ForeignStorageInterface.h"
#include "DataMgr/ForeignStorage/FsiChunkUtils.h"
#include "DataMgr/ForeignStorage/RegexParserDataWrapper.h"
#include "Fragmenter/Fragmenter.h"
#include "Fragmenter/SortedOrderFragmenter.h"
#include "LockMgr/LockMgr.h"
#include "MigrationMgr/MigrationMgr.h"
#include "OSDependent/heavyai_path.h"
#include "Parser/ParserNode.h"
#include "RefreshTimeCalculator.h"
#include "Shared/DateTimeParser.h"
#include "Shared/File.h"
#include "Shared/StringTransform.h"
#include "Shared/SysDefinitions.h"
#include "Shared/measure.h"
#include "Shared/misc.h"
#include "StringDictionary/StringDictionaryClient.h"
#include "MapDRelease.h"
#include "RWLocks.h"
#include "SharedDictionaryValidator.h"
#include "Shared/distributed.h"
#include "Parser/ReservedKeywords.h"

Go to the source code of this file.

Namespaces

 Catalog_Namespace
 
 Catalog_Namespace::anonymous_namespace{Catalog.cpp}
 

Typedefs

using Catalog_Namespace::sys_read_lock = read_lock< SysCatalog >
 
using Catalog_Namespace::cat_read_lock = read_lock< Catalog >
 
using Catalog_Namespace::cat_write_lock = write_lock< Catalog >
 
using Catalog_Namespace::cat_sqlite_lock = sqlite_lock< Catalog >
 

Functions

auto Catalog_Namespace::anonymous_namespace{Catalog.cpp}::table_json_filepath (const std::string &base_path, const std::string &db_name)
 
std::map< int32_t, std::string > Catalog_Namespace::anonymous_namespace{Catalog.cpp}::get_user_id_to_user_name_map ()
 
 Catalog_Namespace::dsqliteMutex_ (std::make_unique< heavyai::DistributedSharedMutex >(std::filesystem::path(basePath_)/shared::kLockfilesDirectoryName/shared::kCatalogDirectoryName/(currentDB_.dbName+".sqlite.lockfile")))
 
 Catalog_Namespace::sqliteMutex_ ()
 
 Catalog_Namespace::sharedMutex_ ()
 
 Catalog_Namespace::thread_holding_sqlite_lock ()
 
 Catalog_Namespace::thread_holding_write_lock ()
 
std::string Catalog_Namespace::anonymous_namespace{Catalog.cpp}::get_user_name_from_id (int32_t id, const std::map< int32_t, std::string > &user_name_by_user_id)
 
void Catalog_Namespace::anonymous_namespace{Catalog.cpp}::set_dict_key (ColumnDescriptor &cd)
 
int64_t Catalog_Namespace::anonymous_namespace{Catalog.cpp}::get_next_refresh_time (const foreign_storage::ForeignTable &foreign_table)
 
std::string Catalog_Namespace::anonymous_namespace{Catalog.cpp}::table_epochs_to_string (const std::vector< TableEpochInfo > &table_epochs)
 
const ColumnDescriptorCatalog_Namespace::anonymous_namespace{Catalog.cpp}::get_foreign_col (const Catalog &cat, const Parser::SharedDictionaryDef &shared_dict_def)
 
void Catalog_Namespace::anonymous_namespace{Catalog.cpp}::replace_cached_table_name (std::map< std::string, int > &cachedTableMap, const std::string &curTableName, const std::string &newTableName, int tableId)
 
bool Catalog_Namespace::contains_spaces (std::string_view str)
 returns true if the string contains one or more spaces More...
 
bool Catalog_Namespace::contains_sql_reserved_chars (std::string_view str, std::string_view chars="`~!@#$%^&*()-=+[{]}\\|;:'\",<.>/?")
 returns true if the string contains one or more OmniSci SQL reserved characters More...
 
bool Catalog_Namespace::is_reserved_sql_keyword (std::string_view str)
 returns true if the string equals an OmniSci SQL reserved keyword More...
 
int32_t Catalog_Namespace::anonymous_namespace{Catalog.cpp}::validate_and_get_user_id (const std::string &user_name)
 
std::string Catalog_Namespace::anonymous_namespace{Catalog.cpp}::convert_object_owners_map_to_string (int32_t db_id, int32_t new_owner_id, const std::map< int32_t, std::vector< DBObject >> &old_owner_db_objects)
 
void Catalog_Namespace::anonymous_namespace{Catalog.cpp}::add_db_object (const std::string &object_name, DBObjectType object_type, int32_t user_id, const AccessPrivileges &privileges, std::map< int32_t, std::vector< DBObject >> &db_objects)
 
SQLTypeInfo Catalog_Namespace::anonymous_namespace{Catalog.cpp}::get_encoded_text_type ()
 
SQLTypeInfo Catalog_Namespace::anonymous_namespace{Catalog.cpp}::get_var_array_type (SQLTypes type)
 
SQLTypeInfo Catalog_Namespace::anonymous_namespace{Catalog.cpp}::get_var_encoded_text_array_type ()
 
void Catalog_Namespace::anonymous_namespace{Catalog.cpp}::set_common_log_system_table_options (foreign_storage::ForeignTable &foreign_table)
 
void Catalog_Namespace::anonymous_namespace{Catalog.cpp}::set_common_db_log_system_table_options (foreign_storage::ForeignTable &foreign_table)
 
void Catalog_Namespace::anonymous_namespace{Catalog.cpp}::clear_cached_table_data (const Data_Namespace::DataMgr *data_mgr, int32_t db_id, int32_t table_id)
 
void Catalog_Namespace::anonymous_namespace{Catalog.cpp}::drop_tables (Catalog &catalog, const std::vector< std::string > &table_names)
 
std::string Catalog_Namespace::anonymous_namespace{Catalog.cpp}::get_checked_table_name (const Catalog *catalog, const ColumnDescriptor *cd)
 

Variables

bool g_enable_fsi {true}
 
bool g_enable_s3_fsi {false}
 
int32_t g_distributed_leaf_idx {-1}
 
int32_t g_distributed_num_leaves {0}
 
bool g_enable_logs_system_tables {true}
 
bool g_enable_logs_system_tables_auto_refresh {false}
 
std::string g_logs_system_tables_refresh_interval {"600S"}
 
bool g_cache_string_hash
 
bool g_enable_system_tables
 
bool g_serialize_temp_tables {false}
 
const int Catalog_Namespace::DEFAULT_INITIAL_VERSION = 1
 
const int Catalog_Namespace::MAPD_TEMP_TABLE_START_ID
 
const int Catalog_Namespace::MAPD_TEMP_DICT_START_ID
 

Detailed Description

Functions for database metadata access.

Definition in file Catalog.cpp.

Variable Documentation

int32_t g_distributed_num_leaves {0}

Definition at line 99 of file Catalog.cpp.

Referenced by foreign_storage::fragment_maps_to_leaf(), and DBHandler::set_leaf_info().

std::string g_logs_system_tables_refresh_interval {"600S"}