Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize bandwidth #6

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions site-observable/docs/data/movies.csv.py

This file was deleted.

22 changes: 0 additions & 22 deletions site-observable/docs/data/shows.csv.py

This file was deleted.

2 changes: 1 addition & 1 deletion site-observable/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Esse nulla Lorem veniam commodo in est consequat sit. Pariatur magna eu est aliq

Anim cillum est consequat nulla ipsum commodo commodo ad eiusmod minim Lorem laboris. Sunt veniam magna laboris duis tempor consequat eu pariatur. Est aute do occaecat voluptate occaecat eiusmod minim fugiat excepteur tempor.

<a href="./series">Choisir une série</a>
<a href="./shows">Choisir une série</a>
7 changes: 3 additions & 4 deletions site-observable/docs/movies.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ title: Choix d'un film

```js
const tallyUrl = "https://tally.so/r/wa6jyb";
const movies = FileAttachment("data/movies.csv").csv({ typed: true });
```

Entrez le nom d'un film:
Expand All @@ -16,13 +15,13 @@ const query = view(Inputs.text());
```

```js
import { DuckDBClient } from "npm:@observablehq/duckdb";
const db = DuckDBClient.of({ movies: movies });
import { SQLiteDatabaseClient } from "npm:@observablehq/sqlite";
const db = FileAttachment("data/movies.sqlite").sqlite();
```

```js
const results = db.query(
`SELECT * FROM movies WHERE movies.title ILIKE ? ORDER BY movies.title`,
`SELECT * FROM movies WHERE movies.title LIKE ? COLLATE NOCASE ORDER BY movies.title`,
[`${query}%`]
);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ title: Choix d'une série télévisée

```js
const tallyUrl = "https://tally.so/r/w48jMo";
const shows = FileAttachment("data/shows.csv").csv({ typed: true });
```

Entrez le nom d'une série télévisée:
Expand All @@ -16,12 +15,12 @@ const query = view(Inputs.text());
```

```js
import { DuckDBClient } from "npm:@observablehq/duckdb";
const db = DuckDBClient.of({ shows: shows });
import { SQLiteDatabaseClient } from "npm:@observablehq/sqlite";
const db = FileAttachment("data/shows.sqlite").sqlite();
```

```js
const results = db.query(`SELECT * FROM shows WHERE shows.name ILIKE ?`, [
const results = db.query(`SELECT * FROM shows WHERE shows.name LIKE ? COLLATE NOCASE`, [
`${query}%`,
]);
```
Expand Down
Loading