Package biana :: Package BianaDB :: Module ConnectorDB :: Class BufferElement
[hide private]
[frames] | no frames]

Class BufferElement

source code


Class used in Buffer object to store a buffer element

Instance Methods [hide private]
 
__init__(self, max_size, table, columns, values=None, max_elements_in_buffer=None)
Initializes a new buffer element
source code
 
getTable(self) source code
 
getColumns(self) source code
 
getValues(self) source code
 
getSize(self) source code
 
insert_values(self, values)
Insert into buffer element a new tuple of values
source code
 
restart_bufferElement(self, values=None)
Restarts a Buffer Element to its initial values and insert the new tuple of values
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, max_size, table, columns, values=None, max_elements_in_buffer=None)
(Constructor)

source code 

Initializes a new buffer element

"max_size" is the maximum size of the buffer element

"table" is the table name in the database

"columns" is a tuple with the names of the columns

"values" is a tuple with the values to insert

Overrides: object.__init__

insert_values(self, values)

source code 

Insert into buffer element a new tuple of values

"values" must be a tuple of values to insert

If the values cannot be inserted because the size has been exceeded, return None