[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-common/src/schema/scripter/processors base...
From: |
Jason Cater |
Subject: |
gnue-common/src/schema/scripter/processors base... |
Date: |
Wed, 25 Jun 2003 19:09:50 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue-common
Branch:
Changes by: Jason Cater <address@hidden> 03/06/25 19:09:50
Modified files:
src/schema/scripter/processors: base.py interbase.py oracle.py
postgresql.py
Log message:
minor fixes for schema generation
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/schema/scripter/processors/base.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/schema/scripter/processors/interbase.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/schema/scripter/processors/oracle.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/schema/scripter/processors/postgresql.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gnue-common/src/schema/scripter/processors/base.py
diff -c gnue-common/src/schema/scripter/processors/base.py:1.3
gnue-common/src/schema/scripter/processors/base.py:1.4
*** gnue-common/src/schema/scripter/processors/base.py:1.3 Wed Jan 1
19:45:45 2003
--- gnue-common/src/schema/scripter/processors/base.py Wed Jun 25 19:09:50 2003
***************
*** 48,69 ****
raise "Unsupported datatype: number"
def string(self, attributes={}):
! raise "Unsupported datatype: number"
def date(self, attributes={}):
! raise "Unsupported datatype: number"
def time(self, attributes={}):
! raise "Unsupported datatype: number"
def timestamp(self, attributes={}):
! raise "Unsupported datatype: number"
def text(self, attributes={}):
! raise "Unsupported datatype: number"
def key(self, attributes={}):
! raise "Unsupported datatype: number"
def comment(self, destination, comment):
--- 48,69 ----
raise "Unsupported datatype: number"
def string(self, attributes={}):
! raise "Unsupported datatype: string"
def date(self, attributes={}):
! raise "Unsupported datatype: date"
def time(self, attributes={}):
! raise "Unsupported datatype: time"
def timestamp(self, attributes={}):
! raise "Unsupported datatype: timestamp"
def text(self, attributes={}):
! raise "Unsupported datatype: text"
def key(self, attributes={}):
! raise "Unsupported datatype: key"
def comment(self, destination, comment):
Index: gnue-common/src/schema/scripter/processors/interbase.py
diff -c gnue-common/src/schema/scripter/processors/interbase.py:1.1
gnue-common/src/schema/scripter/processors/interbase.py:1.2
*** gnue-common/src/schema/scripter/processors/interbase.py:1.1 Sat May 17
16:51:37 2003
--- gnue-common/src/schema/scripter/processors/interbase.py Wed Jun 25
19:09:50 2003
***************
*** 83,96 ****
if object.defaultwith == "serial":
! gen = tablename + '_' + name + '_gen'
if len(gen) > self.MAX_NAME_LENGTH:
! gen = tablename + "_gen_"
gen += str(object._parent._children.index(object))
if len(gen) > self.MAX_NAME_LENGTH:
! gen = tablename + "_" + str(id(object)) + '_gen'
if len(gen) > self.MAX_NAME_LENGTH:
! gen = 'gen_' + id(self)
trigBody.append(" new.%s=gen_id(%s,1);\n" % (name,gen))
--- 83,96 ----
if object.defaultwith == "serial":
! gen = tablename + '_' + name + '_seq'
if len(gen) > self.MAX_NAME_LENGTH:
! gen = tablename + "_seq_"
gen += str(object._parent._children.index(object))
if len(gen) > self.MAX_NAME_LENGTH:
! gen = tablename + "_" + str(id(object)) + '_seq'
if len(gen) > self.MAX_NAME_LENGTH:
! gen = 'seq_%s' % id(object)
trigBody.append(" new.%s=gen_id(%s,1);\n" % (name,gen))
Index: gnue-common/src/schema/scripter/processors/oracle.py
diff -c gnue-common/src/schema/scripter/processors/oracle.py:1.2
gnue-common/src/schema/scripter/processors/oracle.py:1.3
*** gnue-common/src/schema/scripter/processors/oracle.py:1.2 Fri Dec 6
01:25:17 2002
--- gnue-common/src/schema/scripter/processors/oracle.py Wed Jun 25
19:09:50 2003
***************
*** 60,66 ****
if len(sq) > self.MAX_NAME_LENGTH:
sq = tablename + "_" + str(id(object)) + '_seq'
if len(sq) > self.MAX_NAME_LENGTH:
! sq = 'seq_' + id(self)
trigWhen.append('(new.%s is null)' % object.name)
trigBody.append(' IF :new.%s IS NULL THEN\n' % (object.name) + \
--- 60,66 ----
if len(sq) > self.MAX_NAME_LENGTH:
sq = tablename + "_" + str(id(object)) + '_seq'
if len(sq) > self.MAX_NAME_LENGTH:
! sq = 'seq_%s' % id(object)
trigWhen.append('(new.%s is null)' % object.name)
trigBody.append(' IF :new.%s IS NULL THEN\n' % (object.name) + \
Index: gnue-common/src/schema/scripter/processors/postgresql.py
diff -c gnue-common/src/schema/scripter/processors/postgresql.py:1.4
gnue-common/src/schema/scripter/processors/postgresql.py:1.5
*** gnue-common/src/schema/scripter/processors/postgresql.py:1.4 Wed Jan
1 19:45:45 2003
--- gnue-common/src/schema/scripter/processors/postgresql.py Wed Jun 25
19:09:50 2003
***************
*** 86,92 ****
if len(sq) > self.MAX_NAME_LENGTH:
sq = tablename + "_" + str(id(object)) + '_seq'
if len(sq) > self.MAX_NAME_LENGTH:
! sq = 'seq_' + id(self)
pretable.append ('CREATE SEQUENCE %s' % sq)
rv += " DEFAULT nextval('%s')" % sq
--- 86,92 ----
if len(sq) > self.MAX_NAME_LENGTH:
sq = tablename + "_" + str(id(object)) + '_seq'
if len(sq) > self.MAX_NAME_LENGTH:
! sq = 'seq_%s' % id(object)
pretable.append ('CREATE SEQUENCE %s' % sq)
rv += " DEFAULT nextval('%s')" % sq
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue-common/src/schema/scripter/processors base...,
Jason Cater <=