tech:notes_sqlite
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| tech:notes_sqlite [2025/11/05 15:03] – Jean-Baptiste | tech:notes_sqlite [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes Sqlite | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | Voir aussi : | ||
| + | * unqlite | ||
| + | * PocketBase (Rest API pour SQLite) | ||
| + | * SQLCipher | ||
| + | |||
| + | ~~~bash | ||
| + | sqlite databasename.sqlite .dump | sqlite3 databasename.sqlite3 | ||
| + | sqlite3 base.db VACUUM; | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ~~~ | ||
| + | There are a few steps to see the tables in an SQLite database: | ||
| + | |||
| + | List the tables in your database: | ||
| + | |||
| + | .tables | ||
| + | |||
| + | List how the table looks: | ||
| + | |||
| + | .schema tablename | ||
| + | |||
| + | Print the entire table: | ||
| + | |||
| + | SELECT * FROM tablename; | ||
| + | |||
| + | List all of the available SQLite prompt commands: | ||
| + | |||
| + | .help | ||
| + | ~~~ | ||
| + | |||
| + | ## Firefox | ||
| + | |||
| + | ~~~bash | ||
| + | cd ~/ | ||
| + | ~~~ | ||
| + | |||
| + | Chercher un motif dans toutes les tables et champs | ||
| + | ~~~bash | ||
| + | sqlite3 places.sqlite .dump | grep acme\.fr | awk ' | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ### Effacer | ||
| + | |||
| + | ** A faire : jointures ** | ||
| + | |||
| + | Méthode 1 | ||
| + | |||
| + | ~~~bash | ||
| + | sqlite3 places.sqlite | ||
| + | ~~~ | ||
| + | |||
| + | ~~~sql | ||
| + | select * from moz_hosts where host like " | ||
| + | delete from moz_hosts where host like " | ||
| + | ~~~ | ||
| + | |||
| + | Méthode 2 | ||
| + | |||
| + | ~~~bash | ||
| + | cp -p places.sqlite places.sqlite.bck | ||
| + | sqlite3 places.sqlite.bck .dump | grep -v ' | ||
| + | ~~~ | ||
| + | |||
| + | ## GUI | ||
| + | |||
| + | Liste : | ||
| + | |||
| + | * Extension Firefox " | ||
| + | * sqlitebrowser | ||
| + | |||
| + | |||
| + | |||
