2
# This file is part of GNU Enterprise.
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.
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.
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.
19
# Copyright 2000-2005 Free Software Foundation
29
__all__ = ['Introspection']
32
from string import lower, join, split
35
from gnue.common.apps import GConfig
36
from gnue.common.datasources import GIntrospection
38
class Introspection(GIntrospection.Introspection):
40
# list of the types of Schema objects this driver provides
41
types =[ ('view',_('Views'),1),
42
('table',_('Tables'),1) ]
45
# TODO: This is a quick hack to get this class
46
# TODO: into the new-style schema format.
47
# TODO: getSchema* should be merged into find()
49
def find(self, name=None, type=None):
51
return self.getSchemaList(type)
53
rs = self.getSchemaByName(name, type)
60
# TODO: Merge into find()
61
# Return a list of Schema objects
63
# Schema (metadata) functions
66
# TODO: See postgresql for an example of what these functions do.
68
# Return a list of Schema objects
69
def getSchemaList(self, type=None):
72
# Find a schema object with specified name
73
def getSchemaByName(self, name, type=None):