/usr/include/root/TSQLColumnInfo.h is in libroot-net-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | // @(#)root/net:$Id$
// Author: Sergey Linev 31/05/2006
/*************************************************************************
* Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TSQLColumnInfo
#define ROOT_TSQLColumnInfo
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
class TSQLColumnInfo : public TNamed {
protected:
// Database specific fields
TString fTypeName; //! sql type name, as reported by DB. Should be as much as close to declaration of column in CREATE TABLE query
// Database independent fields
Int_t fSQLType; //! datatype code (see TSQLServer::ESQLDataTypes constants), -1 if not defeined
Int_t fSize; //! size of column in bytes, -1 if not defing
Int_t fLength; //! datatype length definition, for instance VARCHAR(len) or FLOAT(len), -1 if not defined
Int_t fScale; //! datatype scale factor, used for instance in NUMBER(len,scale) definition. -1 if not defined
Int_t fSigned; //! if datatype signed or not, 0 - kFALSE, 1 - kTRUE, -1 - unknown
Bool_t fNullable; //! identify if value can be NULL
public:
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() {}
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; }
virtual void Print(Option_t* option = "") const;
ClassDef(TSQLColumnInfo, 0) // Summury information about column from SQL table
};
#endif
|