OpenQuizz
Une application de gestion des contenus pédagogiques
ObjectDBW Class Reference
Inheritance diagram for ObjectDBW:
Collaboration diagram for ObjectDBW:

Public Member Functions

def __init__ (self, *args, **kwargs)
 
def set_ostream (self, stream)
 
def ostream (self)
 
def store (self, istream)
 

Detailed Description

Defines an interface to create objects in the database

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
args,
**  kwargs 
)

Member Function Documentation

◆ ostream()

def ostream (   self)
:return: overridden output stream this instance will write to, or None
    if it will write to the default stream

Reimplemented in GitDB.

◆ set_ostream()

def set_ostream (   self,
  stream 
)
Adjusts the stream to which all data should be sent when storing new objects

:param stream: if not None, the stream to use, if None the default stream
    will be used.
:return: previously installed stream, or None if there was no override
:raise TypeError: if the stream doesn't have the supported functionality

Reimplemented in LooseObjectDB, MemoryDB, and GitDB.

◆ store()

def store (   self,
  istream 
)
Create a new object in the database
:return: the input istream object with its sha set to its corresponding value

:param istream: IStream compatible instance. If its sha is already set
    to a value, the object will just be stored in the our database format,
    in which case the input stream is expected to be in object format ( header + contents ).
:raise IOError: if data could not be written

Reimplemented in LooseObjectDB, GitDB, and MemoryDB.


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