library: libSQL #include "TSQLStructure.h" |
TSQLStructure
class description - header file - source file - inheritance tree (.pdf)
protected:
Bool_t CheckNormalClassPair(TSQLStructure* vers, TSQLStructure* info)
Long64_t FindMaxObjectId()
void PerformConversion(TSqlRegistry* reg, TSqlRawBuffer* blobs, const char* topname, Bool_t useblob = kFALSE)
Bool_t RecognizeTString(const char*& value)
Bool_t StoreClassInNormalForm(TSqlRegistry* reg)
Bool_t StoreElementInNormalForm(TSqlRegistry* reg, TSQLTableData* columns)
Bool_t StoreObject(TSqlRegistry* reg, Long64_t objid, TClass* cl, Bool_t registerobj = kTRUE)
Bool_t StoreObjectInNormalForm(TSqlRegistry* reg)
Bool_t StoreTObject(TSqlRegistry* reg)
Bool_t StoreTString(TSqlRegistry* reg)
Bool_t TryConvertObjectArray(TSqlRegistry* reg, TSqlRawBuffer* blobs)
public:
TSQLStructure()
TSQLStructure(const TSQLStructure&)
virtual ~TSQLStructure()
void Add(TSQLStructure* child)
void AddObjectData(TSQLObjectData* objdata)
static void AddStrBrackets(TString& s, const char* quote)
void AddValue(const char* value, const char* tname = "0")
void AddVersion(const TClass* cl, Int_t version = -100)
void ChangeValueOnly(const char* value)
void ChildArrayIndex(Int_t index, Int_t cnt = 1)
static TClass* Class()
Bool_t ConvertToTables(TSQLFile* f, Long64_t keyid, TObjArray* cmds)
static TString DefineElementColumnName(TStreamerElement* elem, TSQLFile* f, Int_t indx = 0)
static Int_t DefineElementColumnType(TStreamerElement* elem, TSQLFile* f)
Long64_t DefineObjectId(Bool_t recursive = kTRUE)
Int_t GetArrayIndex() const
TSQLStructure* GetChild(Int_t n) const
Bool_t GetClassInfo(TClass*& cl, Version_t& version)
TClass* GetCustomClass() const
Version_t GetCustomClassVersion() const
TStreamerElement* GetElement() const
Int_t GetElementNumber() const
TClass* GetObjectClass() const
TSQLObjectData* GetObjectData(Bool_t search = false)
TSQLStructure* GetParent() const
Int_t GetRepeatCounter() const
static const char* GetSimpleTypeName(Int_t typ)
TStreamerInfo* GetStreamerInfo() const
Int_t GetType() const
const char* GetValue() const
const char* GetValueType() const
TClass* GetVersionClass() const
virtual TClass* IsA() const
static Bool_t IsNumericType(Int_t typ)
Int_t LocateElementColumn(TSQLFile* f, TBufferSQL2* buf, TSQLObjectData* data)
static TString MakeArrayIndex(TStreamerElement* elem, Int_t n)
Int_t NumChilds() const
virtual void Print(Option_t* option = "") const
void PrintLevel(Int_t level) const
void SetArray(Int_t sz = -1)
void SetArrayIndex(Int_t indx, Int_t cnt = 1)
void SetClassStreamer(const TClass* cl)
void SetCustomClass(const TClass* cl, Version_t version)
void SetCustomElement(TStreamerElement* elem)
void SetObjectData(TSQLObjectData* objdata)
void SetObjectPointer(Long64_t ptrid)
void SetObjectRef(Long64_t refid, const TClass* cl)
void SetParent(TSQLStructure* p)
void SetStreamerElement(const TStreamerElement* elem, Int_t number)
void SetStreamerInfo(const TStreamerInfo* info)
void SetType(Int_t typ)
void SetValue(const char* value, const char* tname = "0")
void SetVersion(const TClass* cl, Int_t version = -100)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
static Bool_t UnpackTObject(TSQLFile* f, TBufferSQL2* buf, TSQLObjectData* data, Long64_t objid, Int_t clversion)
static Bool_t UnpackTString(TSQLFile* f, TBufferSQL2* buf, TSQLObjectData* data, Long64_t objid, Int_t clversion)
protected:
TSQLStructure* fParent !
Int_t fType !
const void* fPointer !
TString fValue !
Int_t fArrayIndex !
Int_t fRepeatCnt !
TObjArray fChilds !
public:
static const TSQLStructure::ESQLTypes kSqlObject
static const TSQLStructure::ESQLTypes kSqlPointer
static const TSQLStructure::ESQLTypes kSqlVersion
static const TSQLStructure::ESQLTypes kSqlStreamerInfo
static const TSQLStructure::ESQLTypes kSqlClassStreamer
static const TSQLStructure::ESQLTypes kSqlElement
static const TSQLStructure::ESQLTypes kSqlValue
static const TSQLStructure::ESQLTypes kSqlArray
static const TSQLStructure::ESQLTypes kSqlObjectData
static const TSQLStructure::ESQLTypes kSqlCustomClass
static const TSQLStructure::ESQLTypes kSqlCustomElement
static const TSQLStructure::ESQLColumns kColUnknown
static const TSQLStructure::ESQLColumns kColSimple
static const TSQLStructure::ESQLColumns kColSimpleArray
static const TSQLStructure::ESQLColumns kColParent
static const TSQLStructure::ESQLColumns kColObject
static const TSQLStructure::ESQLColumns kColObjectArray
static const TSQLStructure::ESQLColumns kColNormObject
static const TSQLStructure::ESQLColumns kColNormObjectArray
static const TSQLStructure::ESQLColumns kColObjectPtr
static const TSQLStructure::ESQLColumns kColTString
static const TSQLStructure::ESQLColumns kColRawData
static const TSQLStructure::ESQLIdType kIdTable
static const TSQLStructure::ESQLIdType kIdRawTable
static const TSQLStructure::ESQLIdType kIdColumn
________________________________________________________________________
This is hierarhical structure, which is created when data is written
by TBufferSQL2. It contains data all structurual information such:
version of written class, data memeber types of that class, value for
each data memeber and so on.
Such structure in some sense similar to XML node and subnodes structure
Once it created, it converted to SQL statements, which are submitted
to database server.
________________________________________________________________________
const char* GetValue()
returns value
for different structure kinds has different sense
For kSqlVersion it version, for kSqlReference it is object id and so on
void AddValue(const char* value, const char* tname)
Add child structure as value
Long64_t DefineObjectId(Bool_t recursive)
defines current object id, to which this structure belong
make life complicated, because some objects do not get id
automatically in TBufferSQL, but afterwards
const char* GetSimpleTypeName(Int_t typ)
provides name for basic types
used as suffix for column name or field suffix in raw table
void PerformConversion(TSqlRegistry* reg, TSqlRawBuffer* blobs, const char* topname, Bool_t useblob)
perform conversion of structure to sql statements
first tries convert it to normal form
if fails, produces data for raw table
Bool_t StoreObject(TSqlRegistry* reg, Long64_t objid, TClass* cl, Bool_t registerobj)
convert object data to sql statements
if normal (columnwise) representation is not possible,
complete object will be converted to raw format
Bool_t StoreClassInNormalForm(TSqlRegistry* reg)
produces data for complete class table
where not possible, raw data for some elements are created
Bool_t TryConvertObjectArray(TSqlRegistry* reg, TSqlRawBuffer* blobs)
tries to write array of objects as lis of object refereneces
in _streamer_ table, while objects itself will be stored in
other tables. If not successfull, object data will be stored
in _streamer_ table
void AddStrBrackets(TString &s, const char* quote)
adds quotes arround string value and replaces some special symbols
Author: Sergey Linev 20/11/2005
Last update: root/sql:$Name: $:$Id: TSQLStructure.cxx,v 1.13 2006/06/22 08:21:22 brun Exp $
Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.