Line | |
---|
1 | #
|
---|
2 | # SQL Dialect for Microsoft SQL Server
|
---|
3 | #
|
---|
4 | import generic
|
---|
5 |
|
---|
6 | class Dialect(generic.Dialect):
|
---|
7 |
|
---|
8 | def __init__(self, *args, **kwargs):
|
---|
9 |
|
---|
10 | generic.Dialect.__init__(self, *args, **kwargs)
|
---|
11 |
|
---|
12 | if 'version' not in kwargs:
|
---|
13 | self.version = '2000'
|
---|
14 | else:
|
---|
15 | self.version = kwargs['version']
|
---|
16 |
|
---|
17 | self.name = 'Microsoft SQL Server %s' % (self.version)
|
---|
18 |
|
---|
19 | #
|
---|
20 | # Minimum and Maximum DATETIME values
|
---|
21 | #
|
---|
22 | self.mindatetime = '1753-01-01 00:00:00'
|
---|
23 | self.maxdatetime = '9999-12-31 00:00:00'
|
---|
24 |
|
---|
25 | #
|
---|
26 | # Big Integer values
|
---|
27 | #
|
---|
28 | self.bigint = 'BIGINT'
|
---|
29 |
|
---|
30 | #
|
---|
31 | # Small Integer values
|
---|
32 | #
|
---|
33 | self.smallint = 'SMALLINT'
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Maximum VARCHAR length
|
---|
37 | #
|
---|
38 | self.maxvarchar = 'VARCHAR(8000)'
|
---|
Note:
See
TracBrowser
for help on using the repository browser.