4Suite™ API Documentation

# ► Module Ft.Server.Server.Drivers.MySQL

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

## Modules

Escapec |
MySQLContainer | Implements simple containment as a table in MySQL:

## Classes

class MySQLDriver(Ft.Server.Server.Drivers.MySQL.MySQLContainer.MySQLContainer)
Store information in a MySQL (InnoDB) Database

### Methods

__init__(self, dbName, host, port, user, passwd)
commit(self)
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.MySQL.MySQLContainer.MySQLContainer

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 Necessary for MySQL??!

## Fields

FTSERVER_NAMESPACE = 'http://xmlns.4suite.org/reserved'
FTSS_CONTAIMENT_TABLE = 'ftss_containment'
NAME = 'MySQL'
SYSTEM_MODEL_NAME = 'system'
USER_MODEL_NAME = 'user'
VERSION = '0.1'