Package gavo :: Package votable :: Module common :: Class NULLFlags
[frames] | no frames]

Class NULLFlags

source code

object --+
         |
        NULLFlags

an interface to the BINARY2 NULL flags.

Construct it with the number of fields, then use

Instance Methods
 
__init__(self, nFields)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
serialize(self, nullMap)
returns null bytes for nullMap, which is a sequence of booleans with Trues where the field is NULL.
source code
 
serializeFromRow(self, row)
returns null bytes for a row, which is a sequence of values.
source code
 
deserialize(self, bytes)
returns a sequence of booleans giving for each element in a row if there's a NULL there.
source code
 
getFromFile(self, file)
returns a sequence of booleans giving for each element in a row if there's a NULL there.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  masks = [128, 64, 32, 16, 8, 4, 2, 1]
Properties

Inherited from object: __class__

Method Details

__init__(self, nFields)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

serialize(self, nullMap)

source code 

returns null bytes for nullMap, which is a sequence of booleans with Trues where the field is NULL.

It is an error to pass in nullMaps with lengths!=nFields.

serializeFromRow(self, row)

source code 

returns null bytes for a row, which is a sequence of values. Everything that's None is flagged as NULL.