/[gnue]/gnue-common/src/datasources/drivers/Base/Connection.py
ViewVC logotype

Diff of /gnue-common/src/datasources/drivers/Base/Connection.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jcater, Wed Nov 19 02:07:07 2003 UTC revision 1.2 by jcater, Tue Nov 25 17:01:31 2003 UTC
# Line 0  Line 1 
1    #
2    # This file is part of GNU Enterprise.
3    #
4    # GNU Enterprise is free software; you can redistribute it
5    # and/or modify it under the terms of the GNU General Public
6    # License as published by the Free Software Foundation; either
7    # version 2, or (at your option) any later version.
8    #
9    # GNU Enterprise is distributed in the hope that it will be
10    # useful, but WITHOUT ANY WARRANTY; without even the implied
11    # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12    # PURPOSE. See the GNU General Public License for more details.
13    #
14    # You should have received a copy of the GNU General Public
15    # License along with program; see the file COPYING. If not,
16    # write to the Free Software Foundation, Inc., 59 Temple Place
17    # - Suite 330, Boston, MA 02111-1307, USA.
18    #
19    # Copyright 2000-2003 Free Software Foundation
20    #
21    # FILE:
22    # Connection.py
23    #
24    # DESCRIPTION:
25    #
26    # NOTES:
27    #
28    
29    __all__ = ['Connection']
30    
31    
32    # System Init:
33    #   +-- GConnections initializes
34    #   +-- GParser initializes:
35    #     +-- GDataSource loaded
36    #   +-- GDataSources Intialized
37    #     +-- GConnection.getDataObject()
38    #       +--
39    #
40    class Connection:
41      def __init__(self, connections, name, parameters):
42        self.manager = connections
43        self.parameters = parameters
44        self.name = name
45    
46        # Text encoding used by the database.
47        # (Not all databases support this concept)
48        try:
49          self._encoding = parameters['encoding']
50        except KeyError:
51          try:
52             self._encoding = gConfig('textEncoding')
53          except KeyError:
54            # TODO: Is this a safe default?
55            self._encoding = 'iso8859-1'
56    
57    
58      # Commit changes to the database
59      def commit(self):
60        pass
61    
62      # Rollback changes to the database
63      def rollback(self):
64        pass
65    
66      # Close the connection to the database backend
67      def close(self):
68        pass
69    
70      def connect(self, connectData):
71        pass

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26