4Suite™ API Documentation

# ► Module Ft.Server.Server.Drivers.Postgres

Classes: PostgresDriver |  |  |  | Functions: Begin, BuildRdfConnString, Destroy, Exists, Initialize, InitializeModule, Maintain |  |  |  | Fields: FTSS_CONTAIMENT_TABLE, NAME, SYSTEM_MODEL_NAME, USER_MODEL_NAME

## Modules

Escapec |
PostgresContainer | Implements simple containment as a table in Postgres:

## Classes

class PostgresDriver(Ft.Server.Server.Drivers.Postgres.PostgresContainer.PostgresContainer)
Store information in a Postgres Database

### Methods

__init__(self, dbName, host, port, user, passwd)
commit(self)
Make it so!
createFile(self, path, typ, content)
When creating a resource, store the content
deleteFile(self, path, typ)
Delete an object
fetchFile(self, path, typ)
getSystemModel(self)
getUserModel(self)
hasFile(self, path, typ)
See if we have any meta information about this resource
rollback(self)
Undo it
updateFile(self, path, typ, content)
Update only the content about this resource

### Methods inherited from class Ft.Server.Server.Drivers.Postgres.PostgresContainer.PostgresContainer

fetchChildren, initialize, manageChildren

### Methods inherited from class Ft.Server.Server.Drivers.FtssDriver.DataStoreContainer

childReferenceXML, createContainer, deleteContainer

## Functions

Begin(**properties)
Begin a new transaction. Every driver must support this interface. The properties keyword arguments are passed from the config file (or where ever) to the driver. The Begin file is responsible for doing what ever is needed to validate these arguements
BuildRdfConnString(properties)
Destroy(properties, tryOnly=0)
Completly destroy the repo
Exists(properties)
See if this repo exists. The return value for this is three state. 1. Everything is present 0. Some things are there -1 Nothing is there.
Initialize(properties)
Initialize a new copy of the repo. This is not the same as a 4ss_manager init. This is very raw. The adapter will take care of calling our other interfaces (createContainer, createUser, etc) with all of the information about the rest of the 'init' stuff to do
InitializeModule()
Post-import hook to initialize module's runtime variables that are not required at import time, but will be needed before the module-level functions are called.
Maintain(properties)
Perform any maintenance on the db

## Fields

FTSS_CONTAIMENT_TABLE = 'ftss_containment'
NAME = 'Postgres'
SYSTEM_MODEL_NAME = 'system'
USER_MODEL_NAME = 'user'