File tree 3 files changed +23
-10
lines changed
3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 1
- # Batch
1
+ # Vector
2
2
3
- This example demonstrates how to use libSQL to execute a batch of SQL statements .
3
+ This example demonstrates how to use libSQL vector search with a local database .
4
4
5
5
## Running
6
6
7
7
Execute the example:
8
8
9
9
``` bash
10
- swift run Batch
10
+ swift run Vector
11
11
```
12
12
13
- This will setup a SQLite database, execute a batch of SQL statements , and then query the results.
13
+ This will setup a local SQLite database, insert some data , and then query the results using the vector similarity search function .
Original file line number Diff line number Diff line change
1
+ # Remote
2
+
3
+ This example demonstrates how to use libSQL with a remote database.
4
+
5
+ ## Running
6
+
7
+ Execute the example:
8
+
9
+ ``` bash
10
+ TURSO_DATABASE_URL=" ..." TURSO_AUTH_TOKEN=" ..." swift run Remote
11
+ ```
12
+
13
+ This will connect to a remote SQLite database, insert some data, and then query the results.
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ var package = Package(
13
13
// Examples
14
14
. executable( name: " Query " , targets: [ " Query " ] ) ,
15
15
. executable( name: " Transaction " , targets: [ " Transaction " ] ) ,
16
- . executable( name: " Vector " , targets: [ " Vector " ] ) ,
17
16
. executable( name: " Batch " , targets: [ " Batch " ] ) ,
18
17
] ,
19
18
targets: [
@@ -32,11 +31,6 @@ var package = Package(
32
31
dependencies: [ " Libsql " ] ,
33
32
path: " Examples/Transaction "
34
33
) ,
35
- . executableTarget(
36
- name: " Vector " ,
37
- dependencies: [ " Libsql " ] ,
38
- path: " Examples/Vector "
39
- ) ,
40
34
. executableTarget(
41
35
name: " Batch " ,
42
36
dependencies: [ " Libsql " ] ,
@@ -73,5 +67,11 @@ var package = Package(
73
67
path: " Examples/Transactions " ,
74
68
exclude: [ " README.md " , " local.db " ]
75
69
) ,
70
+ . executableTarget(
71
+ name: " Vector " ,
72
+ dependencies: [ " Libsql " ] ,
73
+ path: " Examples/Vector " ,
74
+ exclude: [ " README.md " ]
75
+ ) ,
76
76
]
77
77
)
You can’t perform that action at this time.
0 commit comments