sqlalchemy-iris 0.9.0__tar.gz → 0.10.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sqlalchemy-iris-0.9.0/sqlalchemy_iris.egg-info → sqlalchemy-iris-0.10.0b1}/PKG-INFO +1 -1
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/setup.cfg +1 -1
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris/__init__.py +7 -0
- sqlalchemy-iris-0.10.0b1/sqlalchemy_iris/alembic.py +105 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris/base.py +32 -15
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris/information_schema.py +1 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris/requirements.py +20 -2
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1/sqlalchemy_iris.egg-info}/PKG-INFO +1 -1
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris.egg-info/SOURCES.txt +2 -0
- sqlalchemy-iris-0.10.0b1/tests/test_alembic.py +25 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/LICENSE +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/README.md +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_BufferReader.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_BufferWriter.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_ConnectionInformation.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_ConnectionParameters.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_Constant.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_DBList.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_Device.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_GatewayContext.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_GatewayException.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_GatewayUtility.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRIS.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISConnection.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISEmbedded.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISGlobalNode.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISGlobalNodeView.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISIterator.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISList.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISNative.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISOREF.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISObject.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_IRISReference.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_InStream.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_LegacyIterator.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_ListItem.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_ListReader.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_ListWriter.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_LogFileStream.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_MessageHeader.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_OutStream.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_PrintStream.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_PythonGateway.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_SharedMemorySocket.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/__init__.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/__main__.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_Column.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_DBAPI.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_Descriptor.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_IRISStream.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_Message.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_Parameter.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_ParameterCollection.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_ResultSetRow.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_SQLType.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/__init__.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/_PreParser.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/_Scanner.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/_Token.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/_TokenList.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/__init__.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_BusinessHost.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_BusinessOperation.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_BusinessProcess.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_BusinessService.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_Common.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_Director.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_IRISBusinessOperation.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_IRISBusinessService.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_IRISInboundAdapter.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_IRISOutboundAdapter.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_InboundAdapter.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_Message.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_OutboundAdapter.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/__init__.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/iris/__init__.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/iris/iris_site.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/iris/irisbuiltins.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/iris/irisloader.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/irisnative/_IRISNative.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/irisnative/__init__.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/setup.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris/embedded.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris/iris.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris/provision.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris/types.py +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris.egg-info/dependency_links.txt +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris.egg-info/entry_points.txt +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris.egg-info/requires.txt +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris.egg-info/top_level.txt +0 -0
- {sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/tests/test_suite.py +0 -0
@@ -3,6 +3,13 @@ from sqlalchemy.dialects import registry as _registry
|
|
3
3
|
from . import base
|
4
4
|
from . import iris
|
5
5
|
|
6
|
+
try:
|
7
|
+
import alembic
|
8
|
+
except ImportError:
|
9
|
+
pass
|
10
|
+
else:
|
11
|
+
from .alembic import IRISImpl
|
12
|
+
|
6
13
|
from .base import BIGINT
|
7
14
|
from .base import BIT
|
8
15
|
from .base import DATE
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import logging
|
2
|
+
|
3
|
+
from sqlalchemy.ext.compiler import compiles
|
4
|
+
from alembic.ddl import DefaultImpl
|
5
|
+
from alembic.ddl.base import ColumnNullable
|
6
|
+
from alembic.ddl.base import ColumnType
|
7
|
+
from alembic.ddl.base import ColumnName
|
8
|
+
from alembic.ddl.base import Column
|
9
|
+
from alembic.ddl.base import alter_table
|
10
|
+
from alembic.ddl.base import alter_column
|
11
|
+
from alembic.ddl.base import format_type
|
12
|
+
from alembic.ddl.base import format_column_name
|
13
|
+
|
14
|
+
from .base import IRISDDLCompiler
|
15
|
+
|
16
|
+
log = logging.getLogger(__name__)
|
17
|
+
|
18
|
+
|
19
|
+
class IRISImpl(DefaultImpl):
|
20
|
+
__dialect__ = "iris"
|
21
|
+
|
22
|
+
type_synonyms = DefaultImpl.type_synonyms + (
|
23
|
+
{"BLOB", "LONGVARBINARY"},
|
24
|
+
{"DOUBLE", "FLOAT"},
|
25
|
+
{"DATETIME", "TIMESTAMP"},
|
26
|
+
)
|
27
|
+
|
28
|
+
def compare_type(self, inspector_column: Column, metadata_column: Column) -> bool:
|
29
|
+
# Don't change type of IDENTITY column
|
30
|
+
if (
|
31
|
+
metadata_column.primary_key
|
32
|
+
and metadata_column is metadata_column.table._autoincrement_column
|
33
|
+
):
|
34
|
+
return False
|
35
|
+
|
36
|
+
return super().compare_type(inspector_column, metadata_column)
|
37
|
+
|
38
|
+
def compare_server_default(
|
39
|
+
self,
|
40
|
+
inspector_column: Column,
|
41
|
+
metadata_column: Column,
|
42
|
+
rendered_metadata_default,
|
43
|
+
rendered_inspector_default,
|
44
|
+
):
|
45
|
+
# don't do defaults for IDENTITY columns
|
46
|
+
if (
|
47
|
+
metadata_column.primary_key
|
48
|
+
and metadata_column is metadata_column.table._autoincrement_column
|
49
|
+
):
|
50
|
+
return False
|
51
|
+
|
52
|
+
return super().compare_server_default(
|
53
|
+
inspector_column,
|
54
|
+
metadata_column,
|
55
|
+
rendered_metadata_default,
|
56
|
+
rendered_inspector_default,
|
57
|
+
)
|
58
|
+
|
59
|
+
def correct_for_autogen_constraints(
|
60
|
+
self,
|
61
|
+
conn_unique_constraints,
|
62
|
+
conn_indexes,
|
63
|
+
metadata_unique_constraints,
|
64
|
+
metadata_indexes,
|
65
|
+
):
|
66
|
+
|
67
|
+
doubled_constraints = {
|
68
|
+
index
|
69
|
+
for index in conn_indexes
|
70
|
+
if index.info.get("duplicates_constraint")
|
71
|
+
}
|
72
|
+
|
73
|
+
for ix in doubled_constraints:
|
74
|
+
conn_indexes.remove(ix)
|
75
|
+
|
76
|
+
# if not sqla_compat.sqla_2:
|
77
|
+
# self._skip_functional_indexes(metadata_indexes, conn_indexes)
|
78
|
+
|
79
|
+
@compiles(ColumnNullable, "iris")
|
80
|
+
def visit_column_nullable(
|
81
|
+
element: ColumnNullable, compiler: IRISDDLCompiler, **kw
|
82
|
+
) -> str:
|
83
|
+
return "%s %s %s" % (
|
84
|
+
alter_table(compiler, element.table_name, element.schema),
|
85
|
+
alter_column(compiler, element.column_name),
|
86
|
+
"NULL" if element.nullable else "NOT NULL",
|
87
|
+
)
|
88
|
+
|
89
|
+
|
90
|
+
@compiles(ColumnType, "iris")
|
91
|
+
def visit_column_type(element: ColumnType, compiler: IRISDDLCompiler, **kw) -> str:
|
92
|
+
return "%s %s %s" % (
|
93
|
+
alter_table(compiler, element.table_name, element.schema),
|
94
|
+
alter_column(compiler, element.column_name),
|
95
|
+
"%s" % format_type(compiler, element.type_),
|
96
|
+
)
|
97
|
+
|
98
|
+
|
99
|
+
@compiles(ColumnName, "iris")
|
100
|
+
def visit_rename_column(element: ColumnName, compiler: IRISDDLCompiler, **kw) -> str:
|
101
|
+
return "%s %s RENAME %s" % (
|
102
|
+
alter_table(compiler, element.table_name, element.schema),
|
103
|
+
alter_column(compiler, element.column_name),
|
104
|
+
format_column_name(compiler, element.newname),
|
105
|
+
)
|
@@ -63,8 +63,10 @@ else:
|
|
63
63
|
def check_constraints(cls):
|
64
64
|
return []
|
65
65
|
|
66
|
+
|
66
67
|
from sqlalchemy.types import BIGINT
|
67
68
|
from sqlalchemy.types import VARCHAR
|
69
|
+
from sqlalchemy.types import CHAR
|
68
70
|
from sqlalchemy.types import INTEGER
|
69
71
|
from sqlalchemy.types import DATE
|
70
72
|
from sqlalchemy.types import TIMESTAMP
|
@@ -87,6 +89,7 @@ from .types import IRISTimeStamp
|
|
87
89
|
from .types import IRISDate
|
88
90
|
from .types import IRISDateTime
|
89
91
|
|
92
|
+
|
90
93
|
ischema_names = {
|
91
94
|
"BIGINT": BIGINT,
|
92
95
|
"BIT": BIT,
|
@@ -634,7 +637,7 @@ class IRISDDLCompiler(sql.compiler.DDLCompiler):
|
|
634
637
|
text = self.sql_compiler.process(
|
635
638
|
generated.sqltext, include_table=True, literal_binds=True
|
636
639
|
)
|
637
|
-
text = re.sub(r"(?<!')(\b[^\d]
|
640
|
+
text = re.sub(r"(?<!')(\b[^\W\d]+\w+\b)", r"{\g<1>}", text)
|
638
641
|
# text = text.replace("'", '"')
|
639
642
|
text = "COMPUTECODE {Set {*} = %s}" % (text,)
|
640
643
|
if generated.persisted is False:
|
@@ -722,6 +725,12 @@ class IRISTypeCompiler(compiler.GenericTypeCompiler):
|
|
722
725
|
def visit_TEXT(self, type_, **kw):
|
723
726
|
return "VARCHAR(65535)"
|
724
727
|
|
728
|
+
def visit_LONGVARBINARY(self, type_, **kw):
|
729
|
+
return "LONGVARBINARY"
|
730
|
+
|
731
|
+
def visit_DOUBLE(self, type_, **kw):
|
732
|
+
return "DOUBLE"
|
733
|
+
|
725
734
|
|
726
735
|
class IRISIdentifierPreparer(sql.compiler.IdentifierPreparer):
|
727
736
|
"""Install IRIS specific reserved words."""
|
@@ -1428,22 +1437,20 @@ There are no access to %Dictionary, may be required for some advanced features,
|
|
1428
1437
|
)
|
1429
1438
|
)
|
1430
1439
|
|
1431
|
-
rs = connection.execute(s)
|
1440
|
+
rs = connection.execution_options(future_result=True).execute(s)
|
1432
1441
|
|
1433
1442
|
fkeys = util.defaultdict(dict)
|
1434
1443
|
|
1435
|
-
for row in rs:
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
fkdelrule,
|
1446
|
-
) = row
|
1444
|
+
for row in rs.mappings():
|
1445
|
+
table_name = row[key_constraints.c.table_name]
|
1446
|
+
rfknm = row[key_constraints.c.constraint_name]
|
1447
|
+
scol = row[key_constraints.c.column_name]
|
1448
|
+
rschema = row[key_constraints_ref.c.table_schema]
|
1449
|
+
rtbl = row[key_constraints_ref.c.table_name]
|
1450
|
+
rcol = row[key_constraints_ref.c.column_name]
|
1451
|
+
_ = row[ref_constraints.c.match_option]
|
1452
|
+
fkuprule = row[ref_constraints.c.update_rule]
|
1453
|
+
fkdelrule = row[ref_constraints.c.delete_rule]
|
1447
1454
|
|
1448
1455
|
table_fkey = fkeys[(schema, table_name)]
|
1449
1456
|
|
@@ -1540,7 +1547,10 @@ There are no access to %Dictionary, may be required for some advanced features,
|
|
1540
1547
|
).outerjoin(
|
1541
1548
|
property,
|
1542
1549
|
sql.and_(
|
1543
|
-
|
1550
|
+
sql.or_(
|
1551
|
+
property.c.Name == columns.c.column_name,
|
1552
|
+
property.c.SqlFieldName == columns.c.column_name,
|
1553
|
+
),
|
1544
1554
|
property.c.parent
|
1545
1555
|
== sql.select(tables.c.classname)
|
1546
1556
|
.where(
|
@@ -1593,6 +1603,9 @@ There are no access to %Dictionary, may be required for some advanced features,
|
|
1593
1603
|
if coltype is None:
|
1594
1604
|
util.warn("Did not recognize type '%s' of column '%s'" % (type_, name))
|
1595
1605
|
coltype = sqltypes.NULLTYPE
|
1606
|
+
elif coltype is VARCHAR and charlen == 1:
|
1607
|
+
# VARCHAR(1) as CHAR
|
1608
|
+
coltype = CHAR
|
1596
1609
|
else:
|
1597
1610
|
if issubclass(coltype, sqltypes.Numeric):
|
1598
1611
|
kwargs["precision"] = int(numericprec)
|
@@ -1602,6 +1615,10 @@ There are no access to %Dictionary, may be required for some advanced features,
|
|
1602
1615
|
|
1603
1616
|
coltype = coltype(**kwargs)
|
1604
1617
|
|
1618
|
+
default = "" if default == "$c(0)" else default
|
1619
|
+
if default and default.startswith('"'):
|
1620
|
+
default = "'%s'" % (default[1:-1].replace("'", "''"),)
|
1621
|
+
|
1605
1622
|
cdict = {
|
1606
1623
|
"name": name,
|
1607
1624
|
"type": coltype,
|
@@ -1,9 +1,18 @@
|
|
1
1
|
from sqlalchemy.testing.requirements import SuiteRequirements
|
2
2
|
|
3
|
+
try:
|
4
|
+
from alembic.testing.requirements import SuiteRequirements as AlembicRequirements
|
5
|
+
except: # noqa
|
6
|
+
from sqlalchemy.testing.requirements import Requirements as BaseRequirements
|
7
|
+
|
8
|
+
class AlembicRequirements(BaseRequirements):
|
9
|
+
pass
|
10
|
+
|
11
|
+
|
3
12
|
from sqlalchemy.testing import exclusions
|
4
13
|
|
5
14
|
|
6
|
-
class Requirements(SuiteRequirements):
|
15
|
+
class Requirements(SuiteRequirements, AlembicRequirements):
|
7
16
|
@property
|
8
17
|
def array_type(self):
|
9
18
|
return exclusions.closed()
|
@@ -121,7 +130,6 @@ class Requirements(SuiteRequirements):
|
|
121
130
|
def fk_constraint_option_reflection_onupdate_restrict(self):
|
122
131
|
return exclusions.closed()
|
123
132
|
|
124
|
-
|
125
133
|
@property
|
126
134
|
def precision_numerics_many_significant_digits(self):
|
127
135
|
"""target backend supports values with many digits on both sides,
|
@@ -239,3 +247,13 @@ class Requirements(SuiteRequirements):
|
|
239
247
|
"""Target database reflects unique indexes as unique constrains."""
|
240
248
|
|
241
249
|
return exclusions.open()
|
250
|
+
|
251
|
+
# alembic
|
252
|
+
|
253
|
+
@property
|
254
|
+
def fk_onupdate_restrict(self):
|
255
|
+
return exclusions.closed()
|
256
|
+
|
257
|
+
@property
|
258
|
+
def fk_ondelete_restrict(self):
|
259
|
+
return exclusions.closed()
|
@@ -72,6 +72,7 @@ iris/irisloader.py
|
|
72
72
|
irisnative/_IRISNative.py
|
73
73
|
irisnative/__init__.py
|
74
74
|
sqlalchemy_iris/__init__.py
|
75
|
+
sqlalchemy_iris/alembic.py
|
75
76
|
sqlalchemy_iris/base.py
|
76
77
|
sqlalchemy_iris/embedded.py
|
77
78
|
sqlalchemy_iris/information_schema.py
|
@@ -85,4 +86,5 @@ sqlalchemy_iris.egg-info/dependency_links.txt
|
|
85
86
|
sqlalchemy_iris.egg-info/entry_points.txt
|
86
87
|
sqlalchemy_iris.egg-info/requires.txt
|
87
88
|
sqlalchemy_iris.egg-info/top_level.txt
|
89
|
+
tests/test_alembic.py
|
88
90
|
tests/test_suite.py
|
@@ -0,0 +1,25 @@
|
|
1
|
+
try:
|
2
|
+
import alembic # noqa
|
3
|
+
except: # noqa
|
4
|
+
pass
|
5
|
+
else:
|
6
|
+
from alembic.testing.suite.test_op import (
|
7
|
+
BackendAlterColumnTest as _BackendAlterColumnTest,
|
8
|
+
)
|
9
|
+
from alembic.testing.suite.test_autogen_diffs import (
|
10
|
+
AutoincrementTest as _AutoincrementTest,
|
11
|
+
)
|
12
|
+
from alembic.testing.suite import * # noqa
|
13
|
+
|
14
|
+
class BackendAlterColumnTest(_BackendAlterColumnTest):
|
15
|
+
def test_rename_column(self):
|
16
|
+
# IRIS Uppercases new names
|
17
|
+
self._run_alter_col({}, {"name": "NEWNAME"})
|
18
|
+
|
19
|
+
class AutoincrementTest(_AutoincrementTest):
|
20
|
+
# pk don't change type
|
21
|
+
def test_alter_column_autoincrement_pk_implicit_true(self):
|
22
|
+
pass
|
23
|
+
|
24
|
+
def test_alter_column_autoincrement_pk_explicit_true(self):
|
25
|
+
pass
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_ConnectionInformation.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/_ConnectionParameters.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/_ParameterCollection.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/_PreParser.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/_Scanner.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/_Token.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/_TokenList.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/dbapi/preparser/__init__.py
RENAMED
File without changes
|
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_BusinessOperation.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_BusinessProcess.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_BusinessService.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_IRISBusinessOperation.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_IRISBusinessService.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_IRISInboundAdapter.py
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_IRISOutboundAdapter.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/intersystems_iris/pex/_OutboundAdapter.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris.egg-info/dependency_links.txt
RENAMED
File without changes
|
{sqlalchemy-iris-0.9.0 → sqlalchemy-iris-0.10.0b1}/sqlalchemy_iris.egg-info/entry_points.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|