You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ALGOLIA_SEARCH_SETUP.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,22 @@ algolia: {
26
26
},
27
27
```
28
28
29
+
### Sitemap Configuration
30
+
31
+
A sitemap is automatically generated to help the Algolia crawler efficiently index the documentation. The sitemap configuration is in the preset options:
32
+
33
+
```typescript
34
+
sitemap: {
35
+
lastmod: 'date',
36
+
changefreq: 'weekly',
37
+
priority: 0.5,
38
+
ignorePatterns: ['/tags/**'],
39
+
filename: 'sitemap.xml',
40
+
},
41
+
```
42
+
43
+
The generated sitemap is available at `https://declarative-sqlite.linden.no/sitemap.xml` after deployment. This helps Algolia's crawler discover and index all documentation pages more efficiently.
44
+
29
45
## Setup Steps
30
46
31
47
To complete the Algolia search setup with your open source key:
Copy file name to clipboardExpand all lines: docs/docs/core-library/data-modeling.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
sidebar_position: 4
3
3
---
4
4
5
-
# Data Modeling with DbRecord
5
+
# 🎯 Data Modeling with DbRecord
6
6
7
7
While working with raw `Map<String, Object?>` objects is flexible, it's not type-safe and can be error-prone. `declarative_sqlite` provides a `DbRecord` base class to help you create strongly-typed data models that map directly to your database tables and work seamlessly with the query system.
Copy file name to clipboardExpand all lines: docs/docs/core-library/data-synchronization.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
sidebar_position: 6
3
3
---
4
4
5
-
# Data Synchronization
5
+
# 🔄 Data Synchronization
6
6
7
7
`declarative_sqlite` provides a powerful, built-in framework for implementing offline-first data synchronization. This allows your application to work seamlessly offline and sync its data with a remote server whenever a network connection is available.
Copy file name to clipboardExpand all lines: docs/docs/core-library/file-management.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
sidebar_position: 5
3
3
---
4
4
5
-
# File Management
5
+
# 📁 File Management
6
6
7
7
`declarative_sqlite` provides a robust, integrated system for managing file attachments associated with your database records. This is useful for any application that needs to store user-generated content like images, documents, or other binary data.
Copy file name to clipboardExpand all lines: docs/docs/core-library/intro.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,27 @@
2
2
sidebar_position: 1
3
3
---
4
4
5
-
# Introduction
5
+
# 💪 Introduction
6
6
7
7
The core `declarative_sqlite` library is the powerhouse of the ecosystem. It contains all the essential tools for defining your schema, managing migrations, querying data, and handling Last-Writer-Wins conflict resolution.
8
8
9
9
This section provides a deep dive into the advanced features of the core library.
10
10
11
-
## Key Feature Areas
11
+
## 🎯 Key Feature Areas
12
12
13
-
### Querying
13
+
### 🔍 Querying
14
14
-**Query Builder**: A fluent, type-safe API for constructing complex SQL queries. It supports `SELECT`, `JOIN`, `WHERE`, `GROUP BY`, `ORDER BY`, and more, reducing the risk of syntax errors.
15
15
-**Streaming Queries**: The foundation for building reactive applications. These queries return a `StreamingQuery` that automatically emits a new list of results whenever the underlying data changes. The library performs sophisticated dependency analysis to ensure that streams are only updated when relevant data is modified.
16
16
17
-
### Data Modeling
17
+
### 📊 Data Modeling
18
18
-**`DbRecord` and Code Generation**: A pattern for creating typed data models that map directly to your database tables. The `declarative_sqlite_generator` package can be used to automatically generate typed getters for all columns and setters for LWW columns, eliminating boilerplate and improving code safety.
19
19
-**File Management**: A robust system for associating files with your database records. The `fileset` column type allows you to manage collections of files, with built-in support for adding, retrieving, deleting, and garbage-collecting file assets.
20
20
21
-
### LWW Conflict Resolution
21
+
### 🔄 LWW Conflict Resolution
22
22
-**Hybrid Logical Clock (HLC)**: Used for Last-Writer-Wins (LWW) columns, the HLC is a timestamping mechanism that combines physical time with a logical counter. This ensures consistent conflict resolution when the same data is modified from multiple sources.
23
23
-**LWW Columns**: Special column type that automatically tracks the last modification time using HLC timestamps, enabling conflict-free data merging in distributed scenarios.
24
24
25
-
## What You'll Learn
25
+
## 📖 What You'll Learn
26
26
27
27
In this section, you will learn how to:
28
28
- Build complex, multi-table queries with the **Query Builder**.
Copy file name to clipboardExpand all lines: docs/docs/core-library/query-builder.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
sidebar_position: 2
3
3
---
4
4
5
-
# Query Builder
5
+
# 🔍 Query Builder
6
6
7
7
The query builder provides a fluent, type-safe API for constructing SQL queries. It helps prevent syntax errors and makes your data access logic more readable and maintainable than raw SQL strings.
8
8
9
9
You can access the query builder in two ways:
10
10
1. By passing a callback to `database.query()`.
11
11
2. By creating a `QueryBuilder` instance directly to generate a raw SQL string.
12
12
13
-
## Selecting Columns (`select`)
13
+
## 📝 Selecting Columns (`select`)
14
14
15
15
The `select` method specifies which columns to return. You can pass simple column names, aliases, or even complex expressions.
16
16
@@ -25,7 +25,7 @@ q.select('u.name as author_name, p.title as post_title')
25
25
q.select('COUNT(*) as total_tasks, AVG(priority) as avg_priority')
26
26
```
27
27
28
-
## Specifying the Source (`from`)
28
+
## 🗂️ Specifying the Source (`from`)
29
29
30
30
The `from` method specifies the main table for the query. You can also provide an alias for the table, which is highly recommended, especially when performing joins.
31
31
@@ -37,7 +37,7 @@ q.from('tasks')
37
37
q.from('tasks', 't')
38
38
```
39
39
40
-
## Joining Tables (`join`)
40
+
## 🔗 Joining Tables (`join`)
41
41
42
42
You can join additional tables using the `join`, `leftJoin`, `rightJoin`, and `innerJoin` methods.
43
43
@@ -47,7 +47,7 @@ q.select('t.title, u.name as author')
Copy file name to clipboardExpand all lines: docs/docs/core-library/streaming-queries.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
sidebar_position: 3
3
3
---
4
4
5
-
# Streaming Queries
5
+
# 🌊 Streaming Queries
6
6
7
7
Streaming queries are the cornerstone of building reactive applications with `declarative_sqlite`. Instead of fetching data just once, a streaming query returns a `Stream` that automatically emits a new, updated list of results whenever the underlying data changes.
Copy file name to clipboardExpand all lines: docs/docs/flutter-integration/database-provider.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
sidebar_position: 2
3
3
---
4
4
5
-
# DatabaseProvider
5
+
# 🗄️ DatabaseProvider
6
6
7
7
`DatabaseProvider` is an `InheritedWidget` that simplifies the management and accessibility of your `DeclarativeDatabase` instance within a Flutter application.
Copy file name to clipboardExpand all lines: docs/docs/flutter-integration/intro.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,19 @@
2
2
sidebar_position: 1
3
3
---
4
4
5
-
# Introduction
5
+
# 📱 Introduction
6
6
7
7
The `declarative_sqlite_flutter` package provides a set of widgets and helpers specifically designed to bridge the gap between the core database library and a Flutter application. These tools simplify state management, database lifecycle, and UI updates, allowing you to build reactive, data-driven interfaces with minimal boilerplate.
8
8
9
-
## Key Components
9
+
## 🔧 Key Components
10
10
11
-
### `DatabaseProvider`
11
+
### 🗄️ `DatabaseProvider`
12
12
A Flutter `InheritedWidget` that handles the initialization and lifecycle of your `DeclarativeDatabase` instance. It ensures that your database is opened when the widget is created, closed when it's disposed, and made available to all descendant widgets in the tree. This is the recommended way to manage your database instance in a Flutter app.
13
13
14
-
### `QueryListView`
14
+
### 📋 `QueryListView`
15
15
A powerful, reactive `ListView` that is directly connected to a `StreamingQuery`. It automatically listens for data changes and rebuilds its list of items when the query results are updated. It handles all the complexities of stream subscriptions, state management, and efficient UI updates for lists of data.
16
16
17
-
## What You'll Learn
17
+
## 📖 What You'll Learn
18
18
19
19
In this section, you will learn how to:
20
20
- Properly manage your database lifecycle using **`DatabaseProvider`**.
Copy file name to clipboardExpand all lines: docs/docs/flutter-integration/query-list-view.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
sidebar_position: 3
3
3
---
4
4
5
-
# QueryListView
5
+
# 📋 QueryListView
6
6
7
7
`QueryListView` is a specialized Flutter widget that simplifies the process of displaying a list of data from a `declarative_sqlite` streaming query. It's a reactive `ListView` that automatically updates its contents when the underlying data in the database changes.
0 commit comments