MIDAS
Loading...
Searching...
No Matches
SqlHistoryBase Class Referenceabstract
Inheritance diagram for SqlHistoryBase:
Collaboration diagram for SqlHistoryBase:

Public Member Functions

 SqlHistoryBase ()
 
virtual ~SqlHistoryBase ()
 
int hs_set_debug (int debug)
 set debug level, returns previous debug level
 
int hs_connect (const char *connect_string)
 returns HS_SUCCESS
 
int hs_disconnect ()
 disconnect from history, returns HS_SUCCESS
 
HsSchemanew_event (const char *event_name, time_t timestamp, int ntags, const TAG tags[])
 
int read_schema (HsSchemaVector *sv, const char *event_name, const time_t timestamp)
 
- Public Member Functions inherited from SchemaHistoryBase
 SchemaHistoryBase ()
 
virtual ~SchemaHistoryBase ()
 
int hs_define_event (const char *event_name, time_t timestamp, int ntags, const TAG tags[])
 see hs_define_event(), returns HS_SUCCESS or HS_FILE_ERROR
 
int hs_write_event (const char *event_name, time_t timestamp, int buffer_size, const char *buffer)
 see hs_write_event(), returns HS_SUCCESS or HS_FILE_ERROR
 
int hs_flush_buffers ()
 flush buffered data to storage where it is visible to mhttpd
 
int hs_clear_cache ()
 clear internal cache, returns HS_SUCCESS
 
int hs_get_events (time_t t, std::vector< std::string > *pevents)
 get list of events that exist(ed) at given time and later (value 0 means "return all events from beginning of time"), returns HS_SUCCESS
 
int hs_get_tags (const char *event_name, time_t t, std::vector< TAG > *ptags)
 get list of history variables for given event (use event names returned by hs_get_events()) that exist(ed) at given time and later (value 0 means "all variables for this event that ever existed"), also see hs_get_tags(), returns HS_SUCCESS
 
int hs_get_last_written (time_t timestamp, int num_var, const char *const event_name[], const char *const var_name[], const int var_index[], time_t last_written[])
 
int hs_read_buffer (time_t start_time, time_t end_time, int num_var, const char *const event_name[], const char *const var_name[], const int var_index[], MidasHistoryBufferInterface *buffer[], int hs_status[])
 returns HS_SUCCESS
 
int hs_read (time_t start_time, time_t end_time, time_t interval, int num_var, const char *const event_name[], const char *const var_name[], const int var_index[], int num_entries[], time_t *time_buffer[], double *data_buffer[], int st[])
 see hs_read(), returns HS_SUCCESS
 
int hs_read_binned (time_t start_time, time_t end_time, int num_bins, int num_var, const char *const event_name[], const char *const var_name[], const int var_index[], int num_entries[], int *count_bins[], double *mean_bins[], double *rms_bins[], double *min_bins[], double *max_bins[], time_t *bins_first_time[], double *bins_first_value[], time_t *bins_last_time[], double *bins_last_value[], time_t last_time[], double last_value[], int st[])
 returns HS_SUCCESS
 
- Public Member Functions inherited from MidasHistoryInterface
 MidasHistoryInterface ()
 history type: MIDAS, ODBC, SQLITE, etc
 
virtual ~MidasHistoryInterface ()
 

Public Attributes

SqlBasefSql
 
- Public Attributes inherited from MidasHistoryInterface
char name [NAME_LENGTH]
 
char type [NAME_LENGTH]
 history channel name
 

Protected Member Functions

virtual int read_table_and_event_names (HsSchemaVector *sv)=0
 
virtual int read_column_names (HsSchemaVector *sv, const char *table_name, const char *event_name)=0
 
virtual int create_table (HsSchemaVector *sv, const char *event_name, time_t timestamp)=0
 
virtual int update_column (const char *event_name, const char *table_name, const char *column_name, const char *column_type, const char *tag_name, const char *tag_type, const time_t timestamp, bool active, bool *have_transaction)=0
 
int update_schema (HsSqlSchema *s, const time_t timestamp, const int ntags, const TAG tags[], bool write_enable)
 
int update_schema1 (HsSqlSchema *s, const time_t timestamp, const int ntags, const TAG tags[], bool write_enable, bool *have_transaction)
 

Additional Inherited Members

- Protected Attributes inherited from SchemaHistoryBase
int fDebug
 
std::string fConnectString
 
HsSchemaVector fWriterCurrentSchema
 
std::vector< HsSchema * > fEvents
 
HsSchemaVector fSchema
 

Detailed Description

Definition at line 4683 of file history_schema.cxx.

Constructor & Destructor Documentation

◆ SqlHistoryBase()

SqlHistoryBase::SqlHistoryBase ( )
inline

Definition at line 4688 of file history_schema.cxx.

4689 {
4690 fSql = NULL;
4692 }
int hs_clear_cache()
clear internal cache, returns HS_SUCCESS
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
Here is the call graph for this function:

◆ ~SqlHistoryBase()

virtual SqlHistoryBase::~SqlHistoryBase ( )
inlinevirtual

Definition at line 4694 of file history_schema.cxx.

4695 {
4696 hs_disconnect();
4697 if (fSql)
4698 delete fSql;
4699 fSql = NULL;
4700 }
int hs_disconnect()
disconnect from history, returns HS_SUCCESS
Here is the call graph for this function:

Member Function Documentation

◆ create_table()

virtual int SqlHistoryBase::create_table ( HsSchemaVector sv,
const char event_name,
time_t  timestamp 
)
protectedpure virtual

Implemented in SqliteHistory, and MysqlHistory.

Here is the caller graph for this function:

◆ hs_connect()

int SqlHistoryBase::hs_connect ( const char connect_string)
virtual

returns HS_SUCCESS

Implements SchemaHistoryBase.

Definition at line 4724 of file history_schema.cxx.

4725{
4726 if (fDebug)
4727 printf("hs_connect [%s]!\n", connect_string);
4728
4729 assert(fSql);
4730
4731 if (fSql->IsConnected())
4732 if (strcmp(fConnectString.c_str(), connect_string) == 0)
4733 return HS_SUCCESS;
4734
4735 hs_disconnect();
4736
4737 if (!connect_string || strlen(connect_string) < 1) {
4738 // FIXME: should use "logger dir" or some such default, that code should be in hs_get_history(), not here
4739 connect_string = ".";
4740 }
4741
4743
4744 if (fDebug)
4745 printf("hs_connect: connecting to SQL database \'%s\'\n", fConnectString.c_str());
4746
4747 int status = fSql->Connect(fConnectString.c_str());
4748 if (status != DB_SUCCESS)
4749 return status;
4750
4751 return HS_SUCCESS;
4752}
virtual bool IsConnected()=0
virtual int Connect(const char *dsn=0)=0
#define DB_SUCCESS
Definition midas.h:631
#define HS_SUCCESS
Definition midas.h:727
DWORD status
Definition odbhist.cxx:39
Here is the call graph for this function:

◆ hs_disconnect()

int SqlHistoryBase::hs_disconnect ( )
virtual

disconnect from history, returns HS_SUCCESS

Implements SchemaHistoryBase.

Definition at line 4754 of file history_schema.cxx.

4755{
4756 if (fDebug)
4757 printf("hs_disconnect!\n");
4758
4760
4761 fSql->Disconnect();
4762
4764
4765 return HS_SUCCESS;
4766}
int hs_flush_buffers()
flush buffered data to storage where it is visible to mhttpd
virtual int Disconnect()=0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hs_set_debug()

int SqlHistoryBase::hs_set_debug ( int  debug)
inlinevirtual

set debug level, returns previous debug level

Reimplemented from SchemaHistoryBase.

Definition at line 4702 of file history_schema.cxx.

4703 {
4704 if (fSql)
4705 fSql->fDebug = debug;
4707 }
virtual int hs_set_debug(int debug)
set debug level, returns previous debug level
BOOL debug
debug printouts
Definition mana.cxx:254
Here is the call graph for this function:

◆ new_event()

HsSchema * SqlHistoryBase::new_event ( const char event_name,
time_t  timestamp,
int  ntags,
const TAG  tags[] 
)
virtual

Implements SchemaHistoryBase.

Definition at line 4768 of file history_schema.cxx.

4769{
4770 if (fDebug)
4771 printf("SqlHistory::new_event: event [%s], timestamp %s, ntags %d\n", event_name, TimeToString(timestamp).c_str(), ntags);
4772
4773 int status;
4774
4775 if (fWriterCurrentSchema.size() == 0) {
4777 if (status != HS_SUCCESS)
4778 return NULL;
4779 }
4780
4781 HsSqlSchema* s = (HsSqlSchema*)fWriterCurrentSchema.find_event(event_name, timestamp);
4782
4783 // schema does not exist, the SQL tables probably do not exist yet
4784
4785 if (!s) {
4786 status = create_table(&fWriterCurrentSchema, event_name, timestamp);
4787 if (status != HS_SUCCESS)
4788 return NULL;
4789
4790 s = (HsSqlSchema*)fWriterCurrentSchema.find_event(event_name, timestamp);
4791
4792 if (!s) {
4793 cm_msg(MERROR, "SqlHistory::new_event", "Error: Cannot create schema for event \'%s\', see previous messages", event_name);
4794 fWriterCurrentSchema.find_event(event_name, timestamp, 1);
4795 return NULL;
4796 }
4797 }
4798
4799 assert(s != NULL);
4800
4802 if (status != HS_SUCCESS)
4803 return NULL;
4804
4805 s = (HsSqlSchema*)fWriterCurrentSchema.find_event(event_name, timestamp);
4806
4807 if (!s) {
4808 cm_msg(MERROR, "SqlHistory::new_event", "Error: Cannot update schema database for event \'%s\', see previous messages", event_name);
4809 return NULL;
4810 }
4811
4812 if (0||fDebug) {
4813 printf("SqlHistory::new_event: schema for [%s] is %p\n", event_name, s);
4814 if (s)
4815 s->print();
4816 }
4817
4818 status = update_schema(s, timestamp, ntags, tags, true);
4819 if (status != HS_SUCCESS) {
4820 cm_msg(MERROR, "SqlHistory::new_event", "Error: Cannot create schema for event \'%s\', see previous messages", event_name);
4821 return NULL;
4822 }
4823
4825 if (status != HS_SUCCESS)
4826 return NULL;
4827
4828 s = (HsSqlSchema*)fWriterCurrentSchema.find_event(event_name, timestamp);
4829
4830 if (!s) {
4831 cm_msg(MERROR, "SqlHistory::new_event", "Error: Cannot update schema database for event \'%s\', see previous messages", event_name);
4832 return NULL;
4833 }
4834
4835 if (0||fDebug) {
4836 printf("SqlHistory::new_event: schema for [%s] is %p\n", event_name, s);
4837 if (s)
4838 s->print();
4839 }
4840
4841 // last call to UpdateMysqlSchema with "false" will check that new schema matches the new tags
4842
4843 status = update_schema(s, timestamp, ntags, tags, false);
4844 if (status != HS_SUCCESS) {
4845 cm_msg(MERROR, "SqlHistory::new_event", "Error: Cannot create schema for event \'%s\', see previous messages", event_name);
4846 //fDebug = 1;
4847 //update_schema(s, timestamp, ntags, tags, false);
4848 //abort();
4849 return NULL;
4850 }
4851
4852 HsSqlSchema* e = new HsSqlSchema();
4853
4854 *e = *s; // make a copy of the schema
4855
4856 return e;
4857}
std::string fEventName
unsigned size() const
HsSchema * find_event(const char *event_name, const time_t timestamp, int debug=0)
void print(bool print_tags=true) const
std::string fTableName
HsSchemaVector fWriterCurrentSchema
virtual int create_table(HsSchemaVector *sv, const char *event_name, time_t timestamp)=0
virtual int read_column_names(HsSchemaVector *sv, const char *table_name, const char *event_name)=0
virtual int read_table_and_event_names(HsSchemaVector *sv)=0
int update_schema(HsSqlSchema *s, const time_t timestamp, const int ntags, const TAG tags[], bool write_enable)
#define MERROR
Definition midas.h:559
INT cm_msg(INT message_type, const char *filename, INT line, const char *routine, const char *format,...)
Definition midas.cxx:915
static std::string TimeToString(time_t t)
static double e(void)
Definition tinyexpr.c:136
Here is the call graph for this function:

◆ read_column_names()

virtual int SqlHistoryBase::read_column_names ( HsSchemaVector sv,
const char table_name,
const char event_name 
)
protectedpure virtual

Implemented in SqliteHistory, and MysqlHistory.

Here is the caller graph for this function:

◆ read_schema()

int SqlHistoryBase::read_schema ( HsSchemaVector sv,
const char event_name,
const time_t  timestamp 
)
virtual

Implements SchemaHistoryBase.

Definition at line 4859 of file history_schema.cxx.

4860{
4861 if (fDebug)
4862 printf("SqlHistory::read_schema: loading schema for event [%s] at time %s\n", event_name, TimeToString(timestamp).c_str());
4863
4864 int status;
4865
4866 if (fSchema.size() == 0) {
4868 if (status != HS_SUCCESS)
4869 return status;
4870 }
4871
4872 //sv->print(false);
4873
4874 if (event_name == NULL)
4875 return HS_SUCCESS;
4876
4877 for (unsigned i=0; i<sv->size(); i++) {
4878 HsSqlSchema* h = (HsSqlSchema*)(*sv)[i];
4879 // skip schema with already read column names
4880 if (h->fVariables.size() > 0)
4881 continue;
4882 // skip schema with different name
4883 if (!MatchEventName(h->fEventName.c_str(), event_name))
4884 continue;
4885
4886 unsigned nn = sv->size();
4887
4888 status = read_column_names(sv, h->fTableName.c_str(), h->fEventName.c_str());
4889
4890 // if new schema was added, loop all over again
4891 if (sv->size() != nn)
4892 i=0;
4893 }
4894
4895 //sv->print(false);
4896
4897 return HS_SUCCESS;
4898}
std::vector< HsSchemaEntry > fVariables
HsSchemaVector fSchema
static bool MatchEventName(const char *event_name, const char *var_event_name)
INT i
Definition mdump.cxx:32
Here is the call graph for this function:

◆ read_table_and_event_names()

virtual int SqlHistoryBase::read_table_and_event_names ( HsSchemaVector sv)
protectedpure virtual

Implemented in SqliteHistory, and MysqlHistory.

Here is the caller graph for this function:

◆ update_column()

virtual int SqlHistoryBase::update_column ( const char event_name,
const char table_name,
const char column_name,
const char column_type,
const char tag_name,
const char tag_type,
const time_t  timestamp,
bool  active,
bool have_transaction 
)
protectedpure virtual

Implemented in SqliteHistory, and MysqlHistory.

Here is the caller graph for this function:

◆ update_schema()

int SqlHistoryBase::update_schema ( HsSqlSchema s,
const time_t  timestamp,
const int  ntags,
const TAG  tags[],
bool  write_enable 
)
protected

Definition at line 4900 of file history_schema.cxx.

4901{
4902 int status;
4903 bool have_transaction = false;
4904
4905 status = update_schema1(s, timestamp, ntags, tags, write_enable, &have_transaction);
4906
4907 if (have_transaction) {
4908 int xstatus;
4909
4910 if (status == HS_SUCCESS)
4912 else
4914
4915 if (xstatus != DB_SUCCESS) {
4916 return HS_FILE_ERROR;
4917 }
4918 have_transaction = false;
4919 }
4920
4921 return status;
4922}
virtual int RollbackTransaction(const char *table_name)=0
virtual int CommitTransaction(const char *table_name)=0
int update_schema1(HsSqlSchema *s, const time_t timestamp, const int ntags, const TAG tags[], bool write_enable, bool *have_transaction)
#define HS_FILE_ERROR
Definition midas.h:728
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_schema1()

int SqlHistoryBase::update_schema1 ( HsSqlSchema s,
const time_t  timestamp,
const int  ntags,
const TAG  tags[],
bool  write_enable,
bool have_transaction 
)
protected

Definition at line 4924 of file history_schema.cxx.

4925{
4926 int status;
4927
4928 if (fDebug)
4929 printf("update_schema1\n");
4930
4931 // check that compare schema with tags[]
4932
4933 bool schema_ok = true;
4934
4935 int offset = 0;
4936 for (int i=0; i<ntags; i++) {
4937 for (unsigned int j=0; j<tags[i].n_data; j++) {
4938 int tagtype = tags[i].type;
4939 std::string tagname = tags[i].name;
4940 std::string maybe_colname = MidasNameToSqlName(tags[i].name);
4941
4942 if (tags[i].n_data > 1) {
4943 char s[256];
4944 sprintf(s, "[%d]", j);
4945 tagname += s;
4946
4947 sprintf(s, "_%d", j);
4948 maybe_colname += s;
4949 }
4950
4951 int count = 0;
4952
4953 for (unsigned j=0; j<s->fVariables.size(); j++) {
4954 // NB: inactive columns will be reactivated or recreated by the if(count==0) branch. K.O.
4955 if (s->fColumnInactive[j])
4956 continue;
4957 if (tagname == s->fVariables[j].name) {
4958 if (s->fSql->TypesCompatible(tagtype, s->fColumnTypes[j].c_str())) {
4959 if (count == 0) {
4960 s->fOffsets[j] = offset;
4962 }
4963 count++;
4964 if (count > 1) {
4965 cm_msg(MERROR, "SqlHistory::update_schema", "Duplicate SQL column \'%s\' type \'%s\' in table \"%s\" with MIDAS type \'%s\' history event \"%s\" tag \"%s\"", s->fColumnNames[j].c_str(), s->fColumnTypes[j].c_str(), s->fTableName.c_str(), rpc_tid_name(tagtype), s->fEventName.c_str(), tagname.c_str());
4967 }
4968 } else {
4969 // column with incompatible type, mark it as unused
4970 schema_ok = false;
4971 if (fDebug)
4972 printf("Incompatible column!\n");
4973 if (write_enable) {
4974 cm_msg(MINFO, "SqlHistory::update_schema", "Deactivating SQL column \'%s\' type \'%s\' in table \"%s\" as incompatible with MIDAS type \'%s\' history event \"%s\" tag \"%s\"", s->fColumnNames[j].c_str(), s->fColumnTypes[j].c_str(), s->fTableName.c_str(), rpc_tid_name(tagtype), s->fEventName.c_str(), tagname.c_str());
4976
4977 status = update_column(s->fEventName.c_str(), s->fTableName.c_str(), s->fColumnNames[j].c_str(), s->fColumnTypes[j].c_str(), s->fVariables[j].tag_name.c_str(), s->fVariables[i].tag_type.c_str(), timestamp, false, have_transaction);
4978 if (status != HS_SUCCESS)
4979 return status;
4980 }
4981 }
4982 }
4983 }
4984
4985 if (count == 0) {
4986 // tag does not have a corresponding column
4987 schema_ok = false;
4988 if (fDebug)
4989 printf("No column for tag %s!\n", tagname.c_str());
4990
4991 bool found_column = false;
4992
4993 if (write_enable) {
4994 for (unsigned j=0; j<s->fVariables.size(); j++) {
4995 if (tagname == s->fVariables[j].tag_name) {
4996 bool typeok = s->fSql->TypesCompatible(tagtype, s->fColumnTypes[j].c_str());
4997 if (typeok) {
4998 cm_msg(MINFO, "SqlHistory::update_schema", "Reactivating SQL column \'%s\' type \'%s\' in table \"%s\" for history event \"%s\" tag \"%s\"", s->fColumnNames[j].c_str(), s->fColumnTypes[j].c_str(), s->fTableName.c_str(), s->fEventName.c_str(), tagname.c_str());
5000
5001 status = update_column(s->fEventName.c_str(), s->fTableName.c_str(), s->fColumnNames[j].c_str(), s->fColumnTypes[j].c_str(), s->fVariables[j].tag_name.c_str(), s->fVariables[j].tag_type.c_str(), timestamp, true, have_transaction);
5002 if (status != HS_SUCCESS)
5003 return status;
5004
5005 if (count == 0) {
5006 s->fOffsets[j] = offset;
5008 }
5009 count++;
5010 found_column = true;
5011 if (count > 1) {
5012 cm_msg(MERROR, "SqlHistory::update_schema", "Duplicate SQL column \'%s\' type \'%s\' in table \"%s\" for history event \"%s\" tag \"%s\"", s->fColumnNames[j].c_str(), s->fColumnTypes[j].c_str(), s->fTableName.c_str(), s->fEventName.c_str(), tagname.c_str());
5014 }
5015 }
5016 }
5017 }
5018 }
5019
5020 // create column
5021 if (!found_column && write_enable) {
5022 std::string col_name = maybe_colname;
5023 const char* col_type = s->fSql->ColumnType(tagtype);
5024
5025 bool dupe = false;
5026 for (unsigned kk=0; kk<s->fColumnNames.size(); kk++)
5027 if (s->fColumnNames[kk] == col_name) {
5028 dupe = true;
5029 break;
5030 }
5031
5032 time_t now = time(NULL);
5033
5034 bool retry = false;
5035 for (int t=0; t<20; t++) {
5036
5037 // if duplicate column name, change it, try again
5038 if (dupe || retry) {
5040 col_name += "_";
5042 if (t > 0) {
5043 char s[256];
5044 sprintf(s, "_%d", t);
5045 col_name += s;
5046 }
5047 }
5048
5049 if (fDebug)
5050 printf("SqlHistory::update_schema: table [%s], add column [%s] type [%s] for tag [%s]\n", s->fTableName.c_str(), col_name.c_str(), col_type, tagname.c_str());
5051
5053
5054 if (status == DB_KEY_EXIST) {
5055 if (fDebug)
5056 printf("SqlHistory::update_schema: table [%s], add column [%s] type [%s] for tag [%s] failed: duplicate column name\n", s->fTableName.c_str(), col_name.c_str(), col_type, tagname.c_str());
5057 retry = true;
5058 continue;
5059 }
5060
5061 if (status != HS_SUCCESS)
5062 return status;
5063
5064 break;
5065 }
5066
5067 if (status != HS_SUCCESS)
5068 return status;
5069
5070 status = update_column(s->fEventName.c_str(), s->fTableName.c_str(), col_name.c_str(), col_type, tagname.c_str(), rpc_tid_name(tagtype), timestamp, true, have_transaction);
5071 if (status != HS_SUCCESS)
5072 return status;
5073 }
5074 }
5075
5076 if (count > 1) {
5077 // schema has duplicate tags
5078 schema_ok = false;
5079 cm_msg(MERROR, "SqlHistory::update_schema", "Duplicate tags or SQL columns for history event \"%s\" tag \"%s\"", s->fEventName.c_str(), tagname.c_str());
5081 }
5082 }
5083 }
5084
5085 // mark as unused all columns not listed in tags
5086
5087 for (unsigned k=0; k<s->fColumnNames.size(); k++)
5088 if (s->fVariables[k].name.length() > 0) {
5089 bool found = false;
5090
5091 for (int i=0; i<ntags; i++) {
5092 for (unsigned int j=0; j<tags[i].n_data; j++) {
5093 std::string tagname = tags[i].name;
5094
5095 if (tags[i].n_data > 1) {
5096 char s[256];
5097 sprintf(s, "[%d]", j);
5098 tagname += s;
5099 }
5100
5101 if (s->fVariables[k].name == tagname) {
5102 found = true;
5103 break;
5104 }
5105 }
5106
5107 if (found)
5108 break;
5109 }
5110
5111 if (!found) {
5112 // column not found in tags list
5113 schema_ok = false;
5114 if (fDebug)
5115 printf("Event [%s] Column [%s] tag [%s] not listed in tags list!\n", s->fEventName.c_str(), s->fColumnNames[k].c_str(), s->fVariables[k].name.c_str());
5116 if (write_enable) {
5117 cm_msg(MINFO, "SqlHistory::update_schema", "Deactivating SQL column \'%s\' type \'%s\' in table \"%s\" for history event \"%s\" not used for any tags", s->fColumnNames[k].c_str(), s->fColumnTypes[k].c_str(), s->fTableName.c_str(), s->fEventName.c_str());
5119
5120 status = update_column(s->fEventName.c_str(), s->fTableName.c_str(), s->fColumnNames[k].c_str(), s->fColumnTypes[k].c_str(), s->fVariables[k].tag_name.c_str(), s->fVariables[k].tag_type.c_str(), timestamp, false, have_transaction);
5121 if (status != HS_SUCCESS)
5122 return status;
5123 }
5124 }
5125 }
5126
5127 if (!write_enable)
5128 if (!schema_ok) {
5129 if (fDebug)
5130 printf("Return error!\n");
5131 return HS_FILE_ERROR;
5132 }
5133
5134 return HS_SUCCESS;
5135}
std::vector< int > fOffsets
std::vector< std::string > fColumnNames
std::vector< std::string > fColumnTypes
std::vector< bool > fColumnInactive
char name[NAME_LENGTH]
Definition history.h:111
virtual bool TypesCompatible(int midas_tid, const char *sql_type)=0
virtual const char * ColumnType(int midas_tid)=0
virtual int update_column(const char *event_name, const char *table_name, const char *column_name, const char *column_type, const char *tag_name, const char *tag_type, const time_t timestamp, bool active, bool *have_transaction)=0
#define DB_KEY_EXIST
Definition midas.h:641
#define MINFO
Definition midas.h:560
INT cm_msg_flush_buffer()
Definition midas.cxx:865
const char * rpc_tid_name(INT id)
Definition midas.cxx:11764
INT rpc_tid_size(INT id)
Definition midas.cxx:11757
static std::string MidasNameToSqlName(const char *s)
static int CreateSqlColumn(SqlBase *sql, const char *table_name, const char *column_name, const char *column_type, bool *have_transaction, int debug)
double count
Definition mdump.cxx:33
static int offset
Definition mgd.cxx:1500
INT j
Definition odbhist.cxx:40
INT k
Definition odbhist.cxx:40
DWORD type
Definition midas.h:1236
DWORD n_data
Definition midas.h:1237
char name[NAME_LENGTH]
Definition midas.h:1235
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fSql

SqlBase* SqlHistoryBase::fSql

Definition at line 4686 of file history_schema.cxx.


The documentation for this class was generated from the following file: