pyobvector 0.2.8__py3-none-any.whl → 0.2.9__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.
@@ -144,15 +144,16 @@ class ObVecJsonTableClient(ObVecClient):
144
144
  if self.user_id is None:
145
145
  return True
146
146
 
147
- session = self.session()
148
- distinct_admin_ids = (
149
- session.query(ObVecJsonTableClient.JsonTableDataTBL.admin_id)
150
- .filter_by(user_id = self.user_id)
151
- .distinct()
152
- .all()
153
- )
154
- admin_ids = [admin_id[0] for admin_id in distinct_admin_ids]
155
- return (len(admin_ids) == 0) or (len(admin_ids) == 1 and admin_ids[0] == self.admin_id)
147
+ with self.session() as session:
148
+ with session.begin():
149
+ distinct_admin_ids = (
150
+ session.query(ObVecJsonTableClient.JsonTableDataTBL.admin_id)
151
+ .filter_by(user_id = self.user_id)
152
+ .distinct()
153
+ .all()
154
+ )
155
+ admin_ids = [admin_id[0] for admin_id in distinct_admin_ids]
156
+ return (len(admin_ids) == 0) or (len(admin_ids) == 1 and admin_ids[0] == self.admin_id)
156
157
 
157
158
  def _reset(self):
158
159
  # Only for test
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyobvector
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: A python SDK for OceanBase Vector Store, based on SQLAlchemy, compatible with Milvus API.
5
5
  Author: shanhaikang.shk
6
6
  Author-email: shanhaikang.shk@oceanbase.com
@@ -15,7 +15,7 @@ Requires-Dist: aiomysql (>=0.2.0,<0.3.0)
15
15
  Requires-Dist: numpy (>=1.17.0,<2.0.0)
16
16
  Requires-Dist: pydantic (>=2.7.0,<3)
17
17
  Requires-Dist: pymysql (>=1.1.1,<2.0.0)
18
- Requires-Dist: sqlalchemy (>=1.4,<2.0.36)
18
+ Requires-Dist: sqlalchemy (>=1.4,<=3)
19
19
  Requires-Dist: sqlglot (>=26.0.1,<27.0.0)
20
20
  Description-Content-Type: text/markdown
21
21
 
@@ -36,7 +36,7 @@ poetry install
36
36
  - install with pip:
37
37
 
38
38
  ```shell
39
- pip install pyobvector==0.2.8
39
+ pip install pyobvector==0.2.9
40
40
  ```
41
41
 
42
42
  ## Build Doc
@@ -7,7 +7,7 @@ pyobvector/client/fts_index_param.py,sha256=hMCjA3Aecnt0uQQT6UQGTIIqdPk1M4gX4-zR
7
7
  pyobvector/client/index_param.py,sha256=3gXi66Ey1PO9x5_61CrH7DmPb496kviBQI5NT7nfbGc,6309
8
8
  pyobvector/client/milvus_like_client.py,sha256=CpPo6mkGE8iNFpKGBFof3h7E1VTzy1DAPGlFM9F_s8g,26373
9
9
  pyobvector/client/ob_vec_client.py,sha256=Yt2nG0w4268hg7DE0tqkGaytGsY-jqojX8hGTQjmsKg,29390
10
- pyobvector/client/ob_vec_json_table_client.py,sha256=l9zlryiyuk7wubksWJjmbUuNWErQZwM69K2qu4K8yVE,38621
10
+ pyobvector/client/ob_vec_json_table_client.py,sha256=V0tljbkbfZI-chnfGTZAarJvOb84KkP6wnyEqLmk2RY,38726
11
11
  pyobvector/client/partitions.py,sha256=Bxwr5yVNlXwZc7SXBC03NeqL9giy4Fe6S2qZdHD8xGw,15621
12
12
  pyobvector/client/schema_type.py,sha256=ICCSriOhk-P7Q1PhK0D0XQMTd3ZDFenCrJMXp6hRQdw,1579
13
13
  pyobvector/json_table/__init__.py,sha256=X5MmK3f10oyJleUUFZJFeunMEfzmf6P1f_7094b-FZc,554
@@ -29,7 +29,7 @@ pyobvector/schema/vector_index.py,sha256=aNtrEBUclc4s6QuqCZpu3Hj3OdjyhbWgtLiJzo6
29
29
  pyobvector/util/__init__.py,sha256=D9EgRDlcMSDhY3uI__vnCl45Or75dOXMWSval5P5fqs,251
30
30
  pyobvector/util/ob_version.py,sha256=ZIySam8q_MCiwctAiAHPB4GdAzGQiXEo1wVkc9IOTDU,1539
31
31
  pyobvector/util/vector.py,sha256=xyM-NuOyd78K7P3kinqyWvLIzEbf9c-4TKn_QVF7qgw,2265
32
- pyobvector-0.2.8.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
33
- pyobvector-0.2.8.dist-info/METADATA,sha256=PVTCENc27h0nh_UwNAF4M1ewnyHZlRGijs9wR3Gkv1o,6661
34
- pyobvector-0.2.8.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
35
- pyobvector-0.2.8.dist-info/RECORD,,
32
+ pyobvector-0.2.9.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
33
+ pyobvector-0.2.9.dist-info/METADATA,sha256=5uhcbXDdN1anCq7Hl1aTF4aDtDBmY10UAfZXltZS3s8,6657
34
+ pyobvector-0.2.9.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
35
+ pyobvector-0.2.9.dist-info/RECORD,,