Skip to content

Commit ffd6224

Browse files
authored
Update README.md
1 parent 5f8867c commit ffd6224

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</p>
1414

1515
# Overview
16-
Otter is a pure Swift SQL compiler that allow developers to write plain comile time safe SQL.
16+
Otter is a pure Swift SQL compiler that allow developers to write plain compile time safe SQL.
1717

1818
- [Installation](#installation)
1919
- [Queries](#queries)
@@ -23,7 +23,7 @@ Otter is a pure Swift SQL compiler that allow developers to write plain comile t
2323

2424
## Basic Primer
2525

26-
As a quick intro, here is an basic example. First, in SQL we will create our migrations and our first query.
26+
As a quick intro, here is a basic example. First, in SQL we will create our migrations and our first query.
2727
```sql
2828
-- Located in Migrations/1.sql
2929
CREATE TABLE todo (
@@ -61,9 +61,6 @@ for try await todos in database.todoQueries.selectTodos.observe() {
6161
### Or Use the Swift Macro
6262
Otter can even run within a Swift macro by adding the `@Database` macro to a `struct`.
6363

64-
> As of now it is not recommended for larger projects. There are quite a few limitations
65-
that won't scale well beyond a fairly simple schema and a handfull of queries. ⚠️
66-
6764
```swift
6865
@Database
6966
struct DB {
@@ -93,6 +90,10 @@ func main() async throws {
9390
}
9491
```
9592

93+
> [!IMPORTANT]
94+
> As of now it is not recommended for larger projects. There are quite a few limitations
95+
that won't scale well beyond a fairly simple schema and a handfull of queries.
96+
9697
#### Current Limitations
9798
* Since macros operate purely on the syntax, all queries must be within the `@Database` itself so it has access to the schema.
9899
* All generated types will be nested under the `@Database` struct.
@@ -128,7 +129,8 @@ This will create all diretories needed and will create your first migration. You
128129
Queries.swift
129130
```
130131

131-
> 💡 Tip: Follow the SQL standard and use singular table names.
132+
> [!TIP]
133+
> Follow the SQL standard and use singular table names. This will stop table structs from being named plural
132134
133135
#### Generating the Database
134136
Once you have your first migration in and the project setup you can now generate the database. In the same directory where `init` was run, you run the `gen` command.
@@ -171,7 +173,8 @@ All queries will be stored in the `/Queries` directory. More than one query can
171173
feather queries add --name <some-name>
172174
```
173175

174-
> 💡 Tip: Organize queries by usage, not by table. This will become more useful later on when we talk about dependency injection.
176+
> [!TIP]
177+
> Organize queries by usage, not by table. This will become more useful later on when we talk about dependency injection.
175178
176179
Open the file that was created in `/Queries`, it should be blank. Individual queries can be defined using the `DEFINE` keyword. At the moment queries can only have one statement.
177180
```sql

0 commit comments

Comments
 (0)