OmniSciDB  6686921089
 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 "Fragmenter/Fragmenter.h"
#include "Fragmenter/SortedOrderFragmenter.h"
#include "LockMgr/LockMgr.h"
#include "MigrationMgr/MigrationMgr.h"
#include "Parser/ParserNode.h"
#include "RefreshTimeCalculator.h"
#include "Shared/DateTimeParser.h"
#include "Shared/File.h"
#include "Shared/StringTransform.h"
#include "Shared/measure.h"
#include "Shared/misc.h"
#include "StringDictionary/StringDictionaryClient.h"
#include "MapDRelease.h"
#include "RWLocks.h"
#include "SharedDictionaryValidator.h"
#include "Parser/ReservedKeywords.h"
+ Include dependency graph for Catalog.cpp:

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::string Catalog_Namespace::anonymous_namespace{Catalog.cpp}::getUserFromId (const int32_t id)
 
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)
 
const TableDescriptorCatalog_Namespace::lookupTableDescriptor (Catalog *cat, std::map< std::string, int > &cachedTableMap, std::string &curTableName)
 
void Catalog_Namespace::replaceTableName (std::map< std::string, int > &cachedTableMap, std::string &curTableName, 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)
 

Variables

int g_test_against_columnId_gap {0}
 
bool g_enable_fsi {false}
 
bool g_enable_s3_fsi {false}
 
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.

Author
Todd Mostak todd@.nosp@m.map-.nosp@m.d.com, Wei Hong wei@m.nosp@m.ap-d.nosp@m..com Copyright (c) 2014 MapD Technologies, Inc. All rights reserved.

Definition in file Catalog.cpp.

Variable Documentation

int g_test_against_columnId_gap {0}

Definition at line 92 of file Catalog.cpp.

Referenced by Catalog_Namespace::Catalog::createTable().