Skip to content

Commit 5792ef2

Browse files
authored
Merge pull request #1300 from fermyon/tpmccallum-patch-10
Fix formatting in code sections
2 parents 2102e36 + b29fd39 commit 5792ef2

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

content/cloud/noops-sql-db.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,19 @@ See [preparing an SQLite Database](https://developer.fermyon.com/spin/sqlite-api
4747

4848
When developing locally, you may also want to test queries, check tables were created properly, or inspect the data in your local SQLite database. [`sqlite3`](https://sqlite.org/cli.html) is a command line program that allows users to evaluate queries interactively. You can point the `sqlite3` CLI to the `.spin/sqlite_db.db` file, located in your application directory, to view or modify your database directly. _Note: `.spin/sqlite_db.db` is created on `spin up`._
4949

50+
The following initializes an sqlite3 CLI that is connected to the `./spin/sqlite_db.db` database:
51+
52+
<!-- @selectiveCpy -->
53+
5054
```bash
5155
$ sqlite3 .spin/sqlite_db.db
5256
SQLite version 3.43.2 2023-10-10 13:08:14
5357
Enter ".help" for usage hints.
58+
```
59+
60+
After connecting you can go ahead and execute SQLite commands in the CLI:
61+
62+
```bash
5463
sqlite> .tables
5564
Users
5665
sqlite> SELECT * FROM Users;
@@ -124,9 +133,10 @@ $ spin cloud sqlite execute -d mydb "CREATE TABLE IF NOT EXISTS todos (id INTEGE
124133
125134
Now you can deploy your application and select `mydb` as the resource you would like to link your application to:
126135

136+
<!-- @selectiveCpy -->
137+
127138
```bash
128-
```bash
129-
spin deploy
139+
$ spin deploy
130140
Uploading todo-app version 0.1.0-r234fe5a4 to Fermyon Cloud...
131141
Deploying...
132142
App "todo-app" accesses a database labeled "default"

0 commit comments

Comments
 (0)