sqlalchemy-iris 0.17.1b6__py3-none-any.whl → 0.17.1b8__py3-none-any.whl

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/base.py CHANGED
@@ -774,6 +774,9 @@ class IRISTypeCompiler(compiler.GenericTypeCompiler):
774
774
  def visit_LONGVARBINARY(self, type_, **kw):
775
775
  return "LONGVARBINARY"
776
776
 
777
+ def visit_LONGVARCHAR(self, type_, **kw):
778
+ return "LONGVARCHAR"
779
+
777
780
  def visit_DOUBLE(self, type_, **kw):
778
781
  return "DOUBLE"
779
782
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: sqlalchemy-iris
3
- Version: 0.17.1b6
3
+ Version: 0.17.1b8
4
4
  Summary: InterSystems IRIS for SQLAlchemy
5
5
  Home-page: https://github.com/caretdev/sqlalchemy-iris
6
6
  Maintainer: CaretDev
@@ -25,6 +25,7 @@ License-File: LICENSE
25
25
  Requires-Dist: SQLAlchemy>=1.3
26
26
  Provides-Extra: intersystems
27
27
  Requires-Dist: intersystems-irispython==5.1.0; extra == "intersystems"
28
+ Dynamic: license-file
28
29
  Dynamic: requires-dist
29
30
 
30
31
  sqlalchemy-iris
@@ -103,6 +104,60 @@ docker run -d --name iris \
103
104
  intersystemsdc/iris-community:preview
104
105
  ```
105
106
 
107
+ Examples
108
+ ===
109
+
110
+ IRISVector
111
+ ---
112
+
113
+ ```python
114
+ from sqlalchemy import Column, MetaData, Table, select
115
+ from sqlalchemy.sql.sqltypes import Integer, UUID
116
+ from sqlalchemy_iris import IRISVector
117
+ from sqlalchemy import create_engine
118
+ from sqlalchemy.orm import DeclarativeBase
119
+ import uuid
120
+
121
+ DATABASE_URL = "iris://_SYSTEM:SYS@localhost:1972/USER"
122
+ engine = create_engine(DATABASE_URL, echo=False)
123
+
124
+ # Create a table metadata
125
+ metadata = MetaData()
126
+
127
+
128
+ class Base(DeclarativeBase):
129
+ pass
130
+
131
+
132
+ def main():
133
+ demo_table = Table(
134
+ "demo_table",
135
+ metadata,
136
+ Column("id", Integer, primary_key=True, autoincrement=True),
137
+ Column("uuid", UUID),
138
+ Column("embedding", IRISVector(item_type=float, max_items=3)),
139
+ )
140
+
141
+ demo_table.drop(engine, checkfirst=True)
142
+ demo_table.create(engine, checkfirst=True)
143
+ with engine.connect() as conn:
144
+ conn.execute(
145
+ demo_table.insert(),
146
+ [
147
+ {"uuid": uuid.uuid4(), "embedding": [1, 2, 3]},
148
+ {"uuid": uuid.uuid4(), "embedding": [2, 3, 4]},
149
+ ],
150
+ )
151
+ conn.commit()
152
+ result = conn.execute(
153
+ demo_table.select()
154
+ ).fetchall()
155
+ print("result", result)
156
+
157
+
158
+ main()
159
+ ```
160
+
106
161
  _Port 1972 is used for binary communication (this driver, xDBC and so on), and 52773 is for web (Management Portal, IRIS based web-applications and API's)._
107
162
 
108
163
  The System Management Portal is available by URL: `http://localhost:52773/csp/sys/UtilHome.csp`
@@ -65,7 +65,7 @@ irisnative/_IRISNative.py,sha256=HQ4nBhc8t8_5OtxdMG-kx1aa-T1znf2I8obZOPLOPzg,665
65
65
  irisnative/__init__.py,sha256=6YmvBLQSURsCPKaNg7LK-xpo4ipDjrlhKuwdfdNb3Kg,341
66
66
  sqlalchemy_iris/__init__.py,sha256=79niafYbL1XOw3eJfu0KwrHfP8CIb2I4HdN4B9PI_sQ,1297
67
67
  sqlalchemy_iris/alembic.py,sha256=L58qBIj6HwLmtU6FS5RXKW0gHr1mNTrBSChEllSh1n0,6607
68
- sqlalchemy_iris/base.py,sha256=c9YpMQMFa6bgWg_z5BS3NskboYdKto9by0FeAe8qVWE,54469
68
+ sqlalchemy_iris/base.py,sha256=MpTfNab_5nQaZZlWpe0jv4Biv7xMvfx__m0xrDQzhHk,54545
69
69
  sqlalchemy_iris/embedded.py,sha256=5WZ78PIYB_pPyaLrK4E7kHUsGBRiwzYHjsTDiNYHUGg,819
70
70
  sqlalchemy_iris/information_schema.py,sha256=FUL3z_viGjjOvDA71Mbk5k94dUGcLV4dW1xHxBgM1rk,6188
71
71
  sqlalchemy_iris/iris.py,sha256=Of0Ruc9W2c5ll5sjAy1xRo4tf1m0l_ab0vAdacTv3Yw,276
@@ -75,9 +75,9 @@ sqlalchemy_iris/requirements.py,sha256=9Klyec0qS2MHEaXbONauP7FUF5bi__vfsBrwOEKKT
75
75
  sqlalchemy_iris/types.py,sha256=M5uyeANVN6MU40kiWBePGTCnVaAAKmfLOHq7zuJ0z6A,12024
76
76
  sqlalchemy_iris/intersystems/__init__.py,sha256=J1WcKKAfEASHTmxCav_sGQeb2GE-FXgrgWnUDY8zMag,5463
77
77
  sqlalchemy_iris/intersystems/dbapi.py,sha256=JOPjpXrD_cwCzAwnO9cRwBtv2SM8YbczOk8PFX3oM_4,899
78
- sqlalchemy_iris-0.17.1b6.dist-info/LICENSE,sha256=RQmigqltsLq8lfOBc_KwtL0gkODyUCNpU-0ZiZwGlho,1075
79
- sqlalchemy_iris-0.17.1b6.dist-info/METADATA,sha256=-sIyXAd0GiVcyVqe0k-oOKp9wlxo6OcdLpp9XRP3eSc,2946
80
- sqlalchemy_iris-0.17.1b6.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
81
- sqlalchemy_iris-0.17.1b6.dist-info/entry_points.txt,sha256=sYU1YvyyeGqOVVMpHySThfEhrVQL1lUVz5rDwmwCj7E,258
82
- sqlalchemy_iris-0.17.1b6.dist-info/top_level.txt,sha256=QRY18YUXUJrRde4aayj_brj0lr2LBRVZS1ZoVoDFVS0,45
83
- sqlalchemy_iris-0.17.1b6.dist-info/RECORD,,
78
+ sqlalchemy_iris-0.17.1b8.dist-info/licenses/LICENSE,sha256=RQmigqltsLq8lfOBc_KwtL0gkODyUCNpU-0ZiZwGlho,1075
79
+ sqlalchemy_iris-0.17.1b8.dist-info/METADATA,sha256=8WXI4b7fN-crWcrFY9TDWcnZcPIXJDKMfL85asLvZT0,4195
80
+ sqlalchemy_iris-0.17.1b8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
81
+ sqlalchemy_iris-0.17.1b8.dist-info/entry_points.txt,sha256=sYU1YvyyeGqOVVMpHySThfEhrVQL1lUVz5rDwmwCj7E,258
82
+ sqlalchemy_iris-0.17.1b8.dist-info/top_level.txt,sha256=QRY18YUXUJrRde4aayj_brj0lr2LBRVZS1ZoVoDFVS0,45
83
+ sqlalchemy_iris-0.17.1b8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5