https://github.com/playform/query
Query 👉🏻
https://github.com/playform/query
Last synced: about 2 months ago
JSON representation
Query 👉🏻
- Host: GitHub
- URL: https://github.com/playform/query
- Owner: PlayForm
- License: cc0-1.0
- Created: 2023-08-16T10:00:25.000Z (over 2 years ago)
- Default Branch: Current
- Last Pushed: 2025-02-22T00:35:38.000Z (about 1 year ago)
- Last Synced: 2025-02-22T01:25:20.563Z (about 1 year ago)
- Homepage: https://GitHub.Com/PlayForm/Query
- Size: 79.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# [Query] 👉🏻
This **[`Astro integration`][astro-integration]** allows you to use SQL queries
inside your components using PRQL.
## Installation 🚀
There are two ways to add integrations to your project. Let's try the most
convenient option first!
### `astro add` command
Astro includes a CLI tool for adding first party integrations: `astro add`. This
command will:
1. (Optionally) Install all necessary dependencies and peer dependencies
2. (Also optionally) Update your `astro.config.*` file to apply this integration
To install `@playform/query`, run the following from your project directory and
follow the prompts:
Using NPM:
```sh
npx astro add @playform/query
```
Using Yarn:
```sh
yarn astro add @playform/query
```
Using PNPM:
```sh
pnpx astro add @playform/query
```
### Install dependencies manually
First, install the `@playform/query` integration like so:
```sh
npm install -D -E @playform/query
```
Then, apply this integration to your `astro.config.*` file using the
`integrations` property:
**`astro.config.ts`**
```ts
import query from "@playform/query";
export default { integrations: [query()] };
```
## Getting started
#### Set `Logger` to `0` if you do not want to see debug messages. Default is `2`.
**`astro.config.ts`**
```ts
import query from "@playform/query";
export default {
integrations: [
query({
Logger: 0,
}),
],
};
```
[Query]: https://NPMJS.Org/@playform/query
[astro-integration]: https://docs.astro.build/en/guides/integrations-guide/
## Changelog
See [`CHANGELOG.md`](CHANGELOG.md) for a history of changes to this integration.