|
MIDAS
|
#include "midas.h"#include "msystem.h"#include "mstrlcpy.h"#include <math.h>#include <vector>#include <list>#include <string>#include <map>#include <unordered_map>#include <algorithm>#include "history.h"
Go to the source code of this file.
Classes | |
| struct | HsSchemaEntry |
| class | HsSchema |
| class | HsSchemaVector |
| class | SqlBase |
| class | HsSqlSchema |
| class | HsFileSchema |
| class | SchemaHistoryBase |
| class | SchemaHistoryBase::ReadBuffer |
| class | SqlHistoryBase |
| class | SqliteHistory |
| class | MysqlHistory |
| class | FileHistory |
Macros | |
| #define | FREE(x) { if (x) free(x); (x) = NULL; } |
Functions | |
| static char * | skip_spaces (char *s) |
| static std::string | TimeToString (time_t t) |
| static std::string | SmallIntToString (int i) |
| static bool | MatchEventName (const char *event_name, const char *var_event_name) |
| static bool | MatchTagName (const char *tag_name, int n_data, const char *var_tag_name, const int var_tag_index) |
| static void | PrintTags (int ntags, const TAG tags[]) |
| static std::string | MidasNameToSqlName (const char *s) |
| static std::string | MidasNameToFileName (const char *s) |
| static int | event_name_cmp (const std::string &e1, const char *e2) |
| static int | var_name_cmp (const std::string &v1, const char *v2) |
| void | DoctorPgsqlColumnType (std::string *col_type, const char *index_type) |
| void | DoctorSqlColumnType (std::string *col_type, const char *index_type) |
| static int | ReadRecord (const char *file_name, int fd, off64_t offset, size_t recsize, off64_t irec, char *rec) |
| static int | FindTime (const char *file_name, int fd, off64_t offset, size_t recsize, off64_t nrec, time_t timestamp, off64_t *i1p, time_t *t1p, off64_t *i2p, time_t *t2p, time_t *tstart, time_t *tend, int debug) |
| static HsSqlSchema * | NewSqlSchema (HsSchemaVector *sv, const char *table_name, time_t t) |
| static int | StartSqlTransaction (SqlBase *sql, const char *table_name, bool *have_transaction) |
| static int | CreateSqlTable (SqlBase *sql, const char *table_name, bool *have_transaction, bool set_default_timestamp=false) |
| static int | CreateSqlHyperTable (SqlBase *sql, const char *table_name, bool *have_transaction) |
| static int | CreateSqlColumn (SqlBase *sql, const char *table_name, const char *column_name, const char *column_type, bool *have_transaction, int debug) |
| static int | ReadSqliteTableNames (SqlBase *sql, HsSchemaVector *sv, const char *table_name, int debug) |
| static int | ReadSqliteTableSchema (SqlBase *sql, HsSchemaVector *sv, const char *table_name, int debug) |
| static int | ReadMysqlTableNames (SqlBase *sql, HsSchemaVector *sv, const char *table_name, int debug, const char *must_have_event_name, const char *must_have_table_name) |
| MidasHistoryInterface * | MakeMidasHistorySqlite () |
| MidasHistoryInterface * | MakeMidasHistoryMysql () |
| MidasHistoryInterface * | MakeMidasHistoryPgsql () |
| MidasHistoryInterface * | MakeMidasHistoryFile () |
Variables | |
| const time_t | kDay = 24*60*60 |
| const time_t | kMonth = 30*kDay |
| const double | KiB = 1024 |
| const double | MiB = KiB*KiB |
| #define FREE | ( | x | ) | { if (x) free(x); (x) = NULL; } |
Definition at line 54 of file history_schema.cxx.
|
static |
Definition at line 4771 of file history_schema.cxx.


|
static |
Definition at line 4697 of file history_schema.cxx.

|
static |
Definition at line 4630 of file history_schema.cxx.


| void DoctorPgsqlColumnType | ( | std::string * | col_type, |
| const char * | index_type | ||
| ) |
Definition at line 301 of file history_schema.cxx.

| void DoctorSqlColumnType | ( | std::string * | col_type, |
| const char * | index_type | ||
| ) |
Definition at line 326 of file history_schema.cxx.


|
static |
Definition at line 219 of file history_schema.cxx.

|
static |
Definition at line 2646 of file history_schema.cxx.


| MidasHistoryInterface * MakeMidasHistoryFile | ( | ) |
| MidasHistoryInterface * MakeMidasHistoryMysql | ( | ) |
Definition at line 7276 of file history_schema.cxx.


| MidasHistoryInterface * MakeMidasHistoryPgsql | ( | ) |
Definition at line 7286 of file history_schema.cxx.


| MidasHistoryInterface * MakeMidasHistorySqlite | ( | ) |
Definition at line 7266 of file history_schema.cxx.


|
static |
Definition at line 117 of file history_schema.cxx.


|
static |
Definition at line 160 of file history_schema.cxx.

|
static |
Definition at line 202 of file history_schema.cxx.

|
static |
Definition at line 185 of file history_schema.cxx.

|
static |
Definition at line 4179 of file history_schema.cxx.


|
static |
Definition at line 177 of file history_schema.cxx.


|
static |
Definition at line 5604 of file history_schema.cxx.


|
static |
Definition at line 2615 of file history_schema.cxx.


|
static |
Definition at line 5261 of file history_schema.cxx.


|
static |
Definition at line 5306 of file history_schema.cxx.


|
static |
Definition at line 56 of file history_schema.cxx.
|
static |
Definition at line 96 of file history_schema.cxx.

|
static |
Definition at line 4617 of file history_schema.cxx.


|
static |
Definition at line 66 of file history_schema.cxx.

|
static |
Definition at line 226 of file history_schema.cxx.

| const time_t kDay = 24*60*60 |
Definition at line 6456 of file history_schema.cxx.
| const double KiB = 1024 |
Definition at line 6459 of file history_schema.cxx.
| const time_t kMonth = 30*kDay |
Definition at line 6457 of file history_schema.cxx.
Definition at line 6460 of file history_schema.cxx.