FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docarray/docarray/array/sqlite.py at main · AsRaNi1/docarray · GitHub
AsRaNi1
/
docarray
Public
forked from
docarray/docarray
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docarray
/
docarray
/
array
/
sqlite.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (24 loc) · 1.18 KB
Breadcrumbs
docarray
/
docarray
/
array
/
sqlite.py
Copy path
File metadata and controls
38 lines (24 loc) · 1.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from
docarray
.
array
.
document
import
DocumentArray
from
docarray
.
array
.
storage
.
sqlite
import
StorageMixins
,
SqliteConfig
__all__
=
[
'SqliteConfig'
,
'DocumentArraySqlite'
]
class
DocumentArraySqlite
(
StorageMixins
,
DocumentArray
):
"""
DocumentArray that stores Documents in a `SQLite database <https://www.sqlite.org/index.html>`_.
This stores Documents on disk instead of keeping them in memory, and offers the simplest way of persisting data with DocArray.
With this implementation, :meth:`match` and :meth:`find` perform exact (exhaustive) vector search.
Example usage:
.. code-block:: python
from docarray import DocumentArray
# with default config
da = DocumentArray(storage='sqlite')
# with customized config
da1 = DocumentArray(storage='sqlite', config={'connection': 'example.db'})
# connect to a previously created database
da = DocumentArray(
storage='sqlite', config={'connection': 'example.db', 'table_name': 'mine'}
)
.. seealso::
For further details, see our :ref:`user guide <sqlite>`.
"""
def
__new__
(
cls
,
*
args
,
**
kwargs
):
return
super
().
__new__
(
cls
)
Back
|
FazBrowse Home
|
New Git URL