class TSQLColumnInfo: public TNamed


 TSQLColumnInfo

 Contains information about single column from SQL table
 Has following methods:
   GetTypeName() - field type name in string form as it is reported by correspondent
          database method. Some databases providing full type name like "numeric(20)",
          other showing only "NUMERIC". As a result, one cannot use this string directly
          to create new field of similar types in other table
   IsNullable() - says if field value can be NULL or not
   GetSQLType() - returns kind of sql type. Possible values:
      TSQLServer::kSQL_NONE        data type unknown
      TSQLServer::kSQL_CHAR        CHAR(n) - string with fixed length n
      TSQLServer::kSQL_VARCHAR     VARCHAR(n) - string with variable length upto n
      TSQLServer::kSQL_INTEGER     INTEGER, INT, TINYINT - any integer types
      TSQLServer::kSQL_FLOAT       FLOAT - float value
      TSQLServer::kSQL_DOUBLE      DOUBLE - double precision value
      TSQLServer::kSQL_NUMERIC     NUMERIC(n,s), NUMBER(n,s) - numeric values with length and precion
      TSQLServer::kSQL_BINARY      BLOB, VARBINARY  - binary data (vriable or fixed size)
      TSQLServer::kSQL_TIMESTAMP   TIMESTAMP - time and date stamp
   GetSize() - size of field in database. -1 if not known.
   GetLength() - length argument in type declaration like CHAR(len) or NUMERIC(len), -1 if not defined
   GetScale() - second argument in declarations like NUMERIC(len, s), -1 if not defined
   GetSigned() - is type signed(==1) or unsigned(==0), -1 if not defined


Function Members (Methods)

public:
TSQLColumnInfo()
TSQLColumnInfo(const TSQLColumnInfo&)
TSQLColumnInfo(const char* columnname, const char* sqltypename = "unknown", Bool_t nullable = kFALSE, Int_t sqltype = -1, Int_t size = -1, Int_t length = -1, Int_t scale = -1, Int_t sign = -1)
virtual~TSQLColumnInfo()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tGetLength() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetScale() const
Int_tGetSigned() const
Int_tGetSize() const
Int_tGetSQLType() const
virtual const char*TNamed::GetTitle() const
const char*GetTypeName() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tIsNullable() const
Bool_tTObject::IsOnHeap() const
Bool_tIsSigned() const
virtual Bool_tTNamed::IsSortable() const
Bool_tIsUnsigned() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TSQLColumnInfo&operator=(const TSQLColumnInfo&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Int_tfLength! datatype length definition, for instance VARCHAR(len) or FLOAT(len), -1 if not defined
TStringTNamed::fNameobject identifier
Bool_tfNullable! identify if value can be NULL
Int_tfSQLType! datatype code (see TSQLServer::ESQLDataTypes constants), -1 if not defeined
Int_tfScale! datatype scale factor, used for instance in NUMBER(len,scale) definition. -1 if not defined
Int_tfSigned! if datatype signed or not, 0 - kFALSE, 1 - kTRUE, -1 - unknown
Int_tfSize! size of column in bytes, -1 if not defing
TStringTNamed::fTitleobject title
TStringfTypeName! sql type name, as reported by DB. Should be as much as close to declaration of column in CREATE TABLE query

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TSQLColumnInfo(const TSQLColumnInfo& )
 default contructor
TSQLColumnInfo(const char* columnname, const char* sqltypename = "unknown", Bool_t nullable = kFALSE, Int_t sqltype = -1, Int_t size = -1, Int_t length = -1, Int_t scale = -1, Int_t sign = -1)
 normal constructor
void Print(Option_t* option = "") const
 Prints column information to standard output
TSQLColumnInfo(const TSQLColumnInfo& )
virtual ~TSQLColumnInfo()
{}
const char* GetTypeName()
{ return fTypeName.Data(); }
Bool_t IsNullable()
{ return fNullable; }
Int_t GetSQLType()
{ return fSQLType; }
Int_t GetSize()
{ return fSize; }
Int_t GetLength()
{ return fLength; }
Int_t GetScale()
{ return fScale; }
Int_t GetSigned()
{ return fSigned; }
Bool_t IsSigned()
{ return fSigned==1; }
Bool_t IsUnsigned()
{ return fSigned==0; }

Author: Sergey Linev 31/05/2006
Last change: root/net:$Id: TSQLColumnInfo.h 23091 2008-04-09 15:04:27Z rdm $
Last generated: 2008-06-25 08:52
Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *

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.