Changeset 5007 for ndgCommon


Ignore:
Timestamp:
23/02/09 09:23:49 (11 years ago)
Author:
cbyrom
Message:

Add interface for relational DB clients to follow - and use this for
the existing postgres client + tidy up this client slightly.

Location:
ndgCommon/trunk/ndg/common/src/clients/reldb
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/clients/reldb/postgres/postgresclient.py

    r4934 r5007  
    66 
    77import pgdb, logging, sys 
     8from ndg.common.src.clients.reldb.interfacereldbclient import InterfaceRelDBClient 
    89 
    910DEFAULT_CONFIG_FILE = 'pg.config' 
    1011 
    11 class PostgresClient(object): 
    12      
     12class PostgresClient(InterfaceRelDBClient): 
    1313     
    1414    def __init__(self, configFile = None): 
     
    4444        # if port specified in file, use this, otherwise use default 
    4545        if len(dbinfo) > 4: 
    46                 dbConnection = self.__dbConnect(dbinfo[0], dbinfo[1], dbinfo[2], dbinfo[3], dbinfo[4]) 
     46                dbConnection = self.__dbConnect(dbinfo[0], dbinfo[1], dbinfo[2], dbinfo[3], port = dbinfo[4]) 
    4747        else: 
    4848                dbConnection = self.__dbConnect(dbinfo[0], dbinfo[1], dbinfo[2], dbinfo[3]) 
Note: See TracChangeset for help on using the changeset viewer.