33 |
|
|
34 |
__all__ = ['Connection'] |
__all__ = ['Connection'] |
35 |
|
|
36 |
from gnue.common.datasources import GDataObjects, GConditions, GConnection |
from gnue.common.datasources import GConditions, Exceptions |
37 |
|
from gnue.common.datasources.drivers.Base import Connection as BaseConnection |
38 |
from gnue.common.apps import GDebug |
from gnue.common.apps import GDebug |
39 |
from gnue.common.rpc import GComm |
from gnue.common.rpc import GComm |
40 |
|
|
49 |
from DataObject import DataObject |
from DataObject import DataObject |
50 |
from gnue.common.datasources.drivers.appserver.Schema.Discovery.Introspection import Introspection |
from gnue.common.datasources.drivers.appserver.Schema.Discovery.Introspection import Introspection |
51 |
|
|
52 |
class Connection(GConnection.Connection): |
class Connection(BaseConnection): |
53 |
|
|
54 |
_DatabaseError = GComm.Error |
_DatabaseError = GComm.Error |
55 |
_defaultBehavior = Introspection |
defaultBehavior = Introspection |
56 |
_supportedDataObjects = { |
supportedDataObjects = { |
57 |
'object': DataObject |
'object': DataObject |
58 |
} |
} |
59 |
|
|
61 |
def getLoginFields(self): |
def getLoginFields(self): |
62 |
return [['_username', 'User Name',0],['_password', 'Password',1]] |
return [['_username', 'User Name',0],['_password', 'Password',1]] |
63 |
|
|
|
def connect(self): |
|
64 |
|
|
65 |
|
def connect(self, connectData): |
66 |
user = connectData['_username'] |
user = connectData['_username'] |
67 |
passwd = connectData['_password'] |
passwd = connectData['_password'] |
68 |
|
|