# SQLAlchemy 0.4 Documentation

Multiple Pages | One Page
Version: 0.4.6 Last Updated: 05/14/08 14:36:43

### module sqlalchemy.databases.maxdb

Support for the MaxDB database.

TODO: More module docs! MaxDB support is currently experimental.

# Overview

The `maxdb` dialect is experimental and has only been tested on 7.6.03.007 and 7.6.00.037. Of these, only 7.6.03.007 will work with SQLAlchemy's ORM. The earlier version has severe `LEFT JOIN` limitations and will return incorrect results from even very simple ORM queries.

Only the native Python DB-API is currently supported. ODBC driver support is a future enhancement.

# Connecting

The username is case-sensitive. If you usually connect to the database with sqlcli and other tools in lower case, you likely need to use upper case for DB-API.

# Implementation Notes

Also check the DatabaseNotes page on the wiki for detailed information.

With the 7.6.00.37 driver and Python 2.5, it seems that all DB-API generated exceptions are broken and can cause Python to crash.

For 'somecol.in_([])' to work, the IN operator's generation must be changed to cast 'NULL' to a numeric, i.e. NUM(NULL). The DB-API doesn't accept a bind parameter there, so that particular generation must inline the NULL value, which depends on [ticket:807].

The DB-API is very picky about where bind params may be used in queries.

Bind params for some functions (e.g. MOD) need type information supplied. The dialect does not yet do this automatically.

Max will occasionally throw up 'bad sql, compile again' exceptions for perfectly valid SQL. The dialect does not currently handle these, more research is needed.

MaxDB 7.5 and Sap DB <= 7.4 reportedly do not support schemas. A very slightly different version of this dialect would be required to support those versions, and can easily be added if there is demand. Some other required components such as an Max-aware 'old oracle style' join compiler (thetas with (+) outer indicators) are already done and available for integration- email the devel list if you're interested in working on this.

### class MaxBlob(Binary)

def bind_processor(self, dialect)
def get_col_spec(self)
def result_processor(self, dialect)
back to section top

### class MaxBoolean(Boolean)

def get_col_spec(self)
back to section top

### class MaxChar(_StringType)

back to section top

### class MaxDate(Date)

def bind_processor(self, dialect)
def get_col_spec(self)
def result_processor(self, dialect)
back to section top

### class MaxFloat(Float)

The FLOAT data type.

def get_col_spec(self)
back to section top

### class MaxInteger(Integer)

def get_col_spec(self)
back to section top

### class MaxNumeric(Numeric)

The FIXED (also NUMERIC, DECIMAL) data type.

def __init__(self, precision=None, length=None, **kw)

Construct a new `MaxNumeric`.

def bind_processor(self, dialect)
def get_col_spec(self)
back to section top

### class MaxSmallInteger(MaxInteger)

def get_col_spec(self)
back to section top

### class MaxString(_StringType)

def __init__(self, *a, **kw)

Construct a new `MaxString`.

back to section top

### class MaxText(_StringType)

def __init__(self, *a, **kw)

Construct a new `MaxText`.

def get_col_spec(self)
back to section top

### class MaxTime(Time)

def bind_processor(self, dialect)
def get_col_spec(self)
def result_processor(self, dialect)
back to section top

### class MaxTimestamp(DateTime)

def bind_processor(self, dialect)
def get_col_spec(self)
def result_processor(self, dialect)
back to section top

### class MaxUnicode(_StringType)

def __init__(self, length=None, **kw)

Construct a new `MaxUnicode`.

back to section top