Skip to content

Commit 22960c5

Browse files
committed
default match pattern is .*
1 parent 36d7a28 commit 22960c5

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

samples/profiles_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
profile = select_ai.Profile()
2424

2525
# matches all the profiles
26-
for fetched_profile in profile.list(profile_name_pattern=".*"):
26+
for fetched_profile in profile.list():
2727
print(fetched_profile.profile_name)

src/select_ai/async_profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@ async def _from_db(cls, profile_name: str) -> "AsyncProfile":
272272

273273
@classmethod
274274
async def list(
275-
cls, profile_name_pattern: str
275+
cls, profile_name_pattern: str = ".*"
276276
) -> AsyncGenerator["AsyncProfile", None]:
277277
"""Asynchronously list AI Profiles saved in the database.
278278
279279
:param str profile_name_pattern: Regular expressions can be used
280280
to specify a pattern. Function REGEXP_LIKE is used to perform the
281-
match
281+
match. Default value is ".*" i.e. match all AI profiles.
282282
283283
:return: Iterator[Profile]
284284
"""

src/select_ai/profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@ def _from_db(cls, profile_name: str) -> "Profile":
244244
raise ProfileNotFoundError(profile_name=profile_name)
245245

246246
@classmethod
247-
def list(cls, profile_name_pattern: str) -> Iterator["Profile"]:
247+
def list(cls, profile_name_pattern: str = ".*") -> Iterator["Profile"]:
248248
"""List AI Profiles saved in the database.
249249
250250
:param str profile_name_pattern: Regular expressions can be used
251251
to specify a pattern. Function REGEXP_LIKE is used to perform the
252-
match
252+
match. Default value is ".*" i.e. match all AI profiles.
253253
254254
:return: Iterator[Profile]
255255
"""

src/select_ai/vector_index.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,12 @@ def get_attributes(self) -> VectorIndexAttributes:
309309
return self._get_attributes(self.index_name)
310310

311311
@classmethod
312-
def list(cls, index_name_pattern: str) -> Iterator["VectorIndex"]:
312+
def list(cls, index_name_pattern: str = ".*") -> Iterator["VectorIndex"]:
313313
"""List Vector Indexes
314314
315315
:param str index_name_pattern: Regular expressions can be used
316316
to specify a pattern. Function REGEXP_LIKE is used to perform the
317-
match
317+
match. Default value is ".*" i.e. match all vector indexes.
318318
319319
:return: Iterator[VectorIndex]
320320
"""
@@ -515,13 +515,14 @@ async def get_attributes(self) -> VectorIndexAttributes:
515515

516516
@classmethod
517517
async def list(
518-
cls, index_name_pattern: str
518+
cls, index_name_pattern: str = ".*"
519519
) -> AsyncGenerator[VectorIndex, None]:
520520
"""List Vector Indexes.
521521
522522
:param str index_name_pattern: Regular expressions can be used
523523
to specify a pattern. Function REGEXP_LIKE is used to perform the
524-
match
524+
match. Default value is ".*" i.e. match all vector indexes.
525+
525526
:return: AsyncGenerator[VectorIndex]
526527
527528
"""

src/select_ai/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# http://oss.oracle.com/licenses/upl.
66
# -----------------------------------------------------------------------------
77

8-
__version__ = "1.0.0.dev6"
8+
__version__ = "1.0.0.dev7"

0 commit comments

Comments
 (0)