ROOT » NET » NET » TSQLColumnInfo

class TSQLColumnInfo: public TNamed


 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)

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()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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(ostream& 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) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_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
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 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
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const

Data Members

static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
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 Chart:

Function documentation

 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
virtual ~TSQLColumnInfo()
const char* GetTypeName() const
{ return fTypeName.Data(); }
Bool_t IsNullable() const
{ return fNullable; }
Int_t GetSQLType() const
{ return fSQLType; }
Int_t GetSize() const
{ return fSize; }
Int_t GetLength() const
{ return fLength; }
Int_t GetScale() const
{ return fScale; }
Int_t GetSigned() const
{ return fSigned; }
Bool_t IsSigned() const
{ return fSigned==1; }
Bool_t IsUnsigned() const
{ return fSigned==0; }