OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
omnisci.common.ttypes.TTypeInfo Class Reference
+ Inheritance diagram for omnisci.common.ttypes.TTypeInfo:
+ Collaboration diagram for omnisci.common.ttypes.TTypeInfo:

Public Member Functions

def __init__
 
def read
 
def write
 
def validate
 
def __repr__
 
def __eq__
 
def __ne__
 

Public Attributes

 type
 
 encoding
 
 nullable
 
 is_array
 
 precision
 
 scale
 
 comp_param
 
 size
 

Private Attributes

 __dict__
 

Detailed Description

Attributes:
 - type
 - encoding
 - nullable
 - is_array
 - precision
 - scale
 - comp_param
 - size

Definition at line 136 of file ttypes.py.

Constructor & Destructor Documentation

def omnisci.common.ttypes.TTypeInfo.__init__ (   self,
  type = None,
  encoding = None,
  nullable = None,
  is_array = None,
  precision = None,
  scale = None,
  comp_param = None,
  size = -1 
)

Definition at line 151 of file ttypes.py.

152  def __init__(self, type=None, encoding=None, nullable=None, is_array=None, precision=None, scale=None, comp_param=None, size=-1,):
153  self.type = type
154  self.encoding = encoding
155  self.nullable = nullable
156  self.is_array = is_array
157  self.precision = precision
158  self.scale = scale
159  self.comp_param = comp_param
160  self.size = size

Member Function Documentation

def omnisci.common.ttypes.TTypeInfo.__eq__ (   self,
  other 
)

Definition at line 263 of file ttypes.py.

264  def __eq__(self, other):
265  return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def omnisci.common.ttypes.TTypeInfo.__ne__ (   self,
  other 
)

Definition at line 266 of file ttypes.py.

267  def __ne__(self, other):
268  return not (self == other)
269 all_structs.append(TTypeInfo)
TTypeInfo.thrift_spec = (
def omnisci.common.ttypes.TTypeInfo.__repr__ (   self)

Definition at line 258 of file ttypes.py.

259  def __repr__(self):
260  L = ['%s=%r' % (key, value)
261  for key, value in self.__dict__.items()]
262  return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
std::string join(T const &container, std::string const &delim)

+ Here is the call graph for this function:

def omnisci.common.ttypes.TTypeInfo.read (   self,
  iprot 
)

Definition at line 161 of file ttypes.py.

References omnisci.common.ttypes.TTypeInfo.comp_param, com.mapd.parser.extension.ddl.omnisci.OmniSciSqlDataTypeSpec.encoding, com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.encoding, omnisci.common.ttypes.TTypeInfo.encoding, omnisci.common.ttypes.TTypeInfo.is_array, com.omnisci.jdbc.OmniSciType.nullable, omnisci.common.ttypes.TTypeInfo.nullable, com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.precision, com.omnisci.jdbc.OmniSciType.precision, omnisci.common.ttypes.TTypeInfo.precision, com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.scale, omnisci.common.ttypes.TTypeInfo.scale, Analyzer::anonymous_namespace{Analyzer.cpp}::IntFracRepr.scale, com.mapd.parser.extension.ddl.omnisql.OmniSqlEncoding.size, com.mapd.parser.extension.ddl.omnisql.OmniSqlArray.size, omnisci.common.ttypes.TTypeInfo.size, com.mapd.parser.extension.ddl.omnisql.OmniSqlEncoding.type, com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.type, com.omnisci.jdbc.OmniSciArray.type, com.mapd.utility.db_vendors.Db_vendor_types.GisType.type, com.omnisci.jdbc.OmniSciColumnTypeTest.Answer.type, ConverterCreateParameter.type, and omnisci.common.ttypes.TTypeInfo.type.

162  def read(self, iprot):
163  if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
164  iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
165  return
166  iprot.readStructBegin()
167  while True:
168  (fname, ftype, fid) = iprot.readFieldBegin()
169  if ftype == TType.STOP:
170  break
171  if fid == 1:
172  if ftype == TType.I32:
173  self.type = iprot.readI32()
174  else:
175  iprot.skip(ftype)
176  elif fid == 4:
177  if ftype == TType.I32:
178  self.encoding = iprot.readI32()
179  else:
180  iprot.skip(ftype)
181  elif fid == 2:
182  if ftype == TType.BOOL:
183  self.nullable = iprot.readBool()
184  else:
185  iprot.skip(ftype)
186  elif fid == 3:
187  if ftype == TType.BOOL:
188  self.is_array = iprot.readBool()
189  else:
190  iprot.skip(ftype)
191  elif fid == 5:
192  if ftype == TType.I32:
193  self.precision = iprot.readI32()
194  else:
195  iprot.skip(ftype)
196  elif fid == 6:
197  if ftype == TType.I32:
198  self.scale = iprot.readI32()
199  else:
200  iprot.skip(ftype)
201  elif fid == 7:
202  if ftype == TType.I32:
203  self.comp_param = iprot.readI32()
204  else:
205  iprot.skip(ftype)
206  elif fid == 8:
207  if ftype == TType.I32:
208  self.size = iprot.readI32()
209  else:
210  iprot.skip(ftype)
211  else:
212  iprot.skip(ftype)
213  iprot.readFieldEnd()
214  iprot.readStructEnd()
def omnisci.common.ttypes.TTypeInfo.validate (   self)

Definition at line 255 of file ttypes.py.

256  def validate(self):
257  return
def omnisci.common.ttypes.TTypeInfo.write (   self,
  oprot 
)

Definition at line 215 of file ttypes.py.

References omnisci.common.ttypes.TTypeInfo.comp_param, com.mapd.parser.extension.ddl.omnisci.OmniSciSqlDataTypeSpec.encoding, com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.encoding, omnisci.common.ttypes.TTypeInfo.encoding, omnisci.common.ttypes.TTypeInfo.is_array, com.omnisci.jdbc.OmniSciType.nullable, omnisci.common.ttypes.TTypeInfo.nullable, com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.precision, com.omnisci.jdbc.OmniSciType.precision, omnisci.common.ttypes.TTypeInfo.precision, com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.scale, omnisci.common.ttypes.TTypeInfo.scale, Analyzer::anonymous_namespace{Analyzer.cpp}::IntFracRepr.scale, com.mapd.parser.extension.ddl.omnisql.OmniSqlEncoding.size, com.mapd.parser.extension.ddl.omnisql.OmniSqlArray.size, omnisci.common.ttypes.TTypeInfo.size, com.mapd.parser.extension.ddl.omnisql.OmniSqlEncoding.type, com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.type, com.omnisci.jdbc.OmniSciArray.type, com.mapd.utility.db_vendors.Db_vendor_types.GisType.type, com.omnisci.jdbc.OmniSciColumnTypeTest.Answer.type, ConverterCreateParameter.type, and omnisci.common.ttypes.TTypeInfo.type.

216  def write(self, oprot):
217  if oprot._fast_encode is not None and self.thrift_spec is not None:
218  oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
219  return
220  oprot.writeStructBegin('TTypeInfo')
221  if self.type is not None:
222  oprot.writeFieldBegin('type', TType.I32, 1)
223  oprot.writeI32(self.type)
224  oprot.writeFieldEnd()
225  if self.nullable is not None:
226  oprot.writeFieldBegin('nullable', TType.BOOL, 2)
227  oprot.writeBool(self.nullable)
228  oprot.writeFieldEnd()
229  if self.is_array is not None:
230  oprot.writeFieldBegin('is_array', TType.BOOL, 3)
231  oprot.writeBool(self.is_array)
232  oprot.writeFieldEnd()
233  if self.encoding is not None:
234  oprot.writeFieldBegin('encoding', TType.I32, 4)
235  oprot.writeI32(self.encoding)
236  oprot.writeFieldEnd()
237  if self.precision is not None:
238  oprot.writeFieldBegin('precision', TType.I32, 5)
239  oprot.writeI32(self.precision)
240  oprot.writeFieldEnd()
241  if self.scale is not None:
242  oprot.writeFieldBegin('scale', TType.I32, 6)
243  oprot.writeI32(self.scale)
244  oprot.writeFieldEnd()
245  if self.comp_param is not None:
246  oprot.writeFieldBegin('comp_param', TType.I32, 7)
247  oprot.writeI32(self.comp_param)
248  oprot.writeFieldEnd()
249  if self.size is not None:
250  oprot.writeFieldBegin('size', TType.I32, 8)
251  oprot.writeI32(self.size)
252  oprot.writeFieldEnd()
253  oprot.writeFieldStop()
254  oprot.writeStructEnd()

Member Data Documentation

omnisci.common.ttypes.TTypeInfo.__dict__
private

Definition at line 264 of file ttypes.py.

omnisci.common.ttypes.TTypeInfo.comp_param

Definition at line 158 of file ttypes.py.

Referenced by omnisci.common.ttypes.TTypeInfo.read(), and omnisci.common.ttypes.TTypeInfo.write().

omnisci.common.ttypes.TTypeInfo.encoding

Definition at line 153 of file ttypes.py.

Referenced by omnisci.common.ttypes.TTypeInfo.read(), and omnisci.common.ttypes.TTypeInfo.write().

omnisci.common.ttypes.TTypeInfo.is_array

Definition at line 155 of file ttypes.py.

Referenced by omnisci.common.ttypes.TTypeInfo.read(), and omnisci.common.ttypes.TTypeInfo.write().

omnisci.common.ttypes.TTypeInfo.nullable

Definition at line 154 of file ttypes.py.

Referenced by omnisci.common.ttypes.TTypeInfo.read(), and omnisci.common.ttypes.TTypeInfo.write().

omnisci.common.ttypes.TTypeInfo.precision

Definition at line 156 of file ttypes.py.

Referenced by omnisci.common.ttypes.TTypeInfo.read(), and omnisci.common.ttypes.TTypeInfo.write().

omnisci.common.ttypes.TTypeInfo.scale

Definition at line 157 of file ttypes.py.

Referenced by omnisci.common.ttypes.TTypeInfo.read(), and omnisci.common.ttypes.TTypeInfo.write().

omnisci.common.ttypes.TTypeInfo.size

Definition at line 159 of file ttypes.py.

Referenced by omnisci.common.ttypes.TTypeInfo.read(), and omnisci.common.ttypes.TTypeInfo.write().

omnisci.common.ttypes.TTypeInfo.type

Definition at line 152 of file ttypes.py.

Referenced by omnisci.completion_hints.ttypes.TCompletionHint.read(), omnisci.common.ttypes.TTypeInfo.read(), omnisci.serialized_result_set.ttypes.TTargetInfo.read(), omnisci.serialized_result_set.ttypes.TCountDistinctSet.read(), omnisci.thrift.ttypes.TColumnRange.read(), omnisci.thrift.ttypes.TRenderDatum.read(), omnisci.thrift.OmniSci.get_db_object_privs_args.read(), omnisci.completion_hints.ttypes.TCompletionHint.write(), omnisci.common.ttypes.TTypeInfo.write(), omnisci.serialized_result_set.ttypes.TTargetInfo.write(), omnisci.serialized_result_set.ttypes.TCountDistinctSet.write(), omnisci.thrift.ttypes.TColumnRange.write(), omnisci.thrift.ttypes.TRenderDatum.write(), and omnisci.thrift.OmniSci.get_db_object_privs_args.write().


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