Skip to content

Commit

Permalink
remove images > 1MB
Browse files Browse the repository at this point in the history
  • Loading branch information
archiewood committed Jan 9, 2025
1 parent 84bba50 commit e82ecf1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
13 changes: 0 additions & 13 deletions sites/docs/pages/components/all-components/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,19 +342,6 @@ description: An index of the components available in the Evidence library.
</div>
</Grid>

### [Mixed Type Charts](/components/charts/mixed-type-charts)

<Grid>
<div class="border rounded-lg p-4 my-2 mx-1 hover:shadow-md transition">
<b>Bar and Line</b>
<a href="/components/charts/mixed-type-charts">

<img src="/img/bar-line.png" alt="bar-line" class="markdown">

</a>
</div>
</Grid>

### [Annotations](/components/charts/annotations)

<Grid>
Expand Down
20 changes: 15 additions & 5 deletions sites/docs/pages/core-concepts/queries/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Evidence runs markdown code fences as SQL queries. These queries use the [DuckDB

If you have a data source called `needful_things`, you run a query against it like this:

<DocTab defaultTab='code'>
<div slot='preview'>

```sql sales_by_category
select
category, sum(sales) as sales
from needful_things.orders
group by 1
```

</div>

````markdown
```sql sales_by_category
select
Expand All @@ -18,6 +30,7 @@ from needful_things.orders
group by 1
```
````
</DocTab>

When you open a page in dev mode, Evidence runs all of the queries on the page. In dev mode, Evidence monitors the contents of your SQL blocks, and reloads the page as necessary to reflect any changes you've made to your queries.

Expand Down Expand Up @@ -71,18 +84,15 @@ from (

### View Compiled SQL

You can choose whether you want to see the compiled or written SQL inside the query viewer:
![compiled-written-toggle](/img/compiled-written-toggle.gif)
You can choose whether you want to see the compiled or written SQL inside the query viewer.

### Ordering and Circular References

The order that queries appear on the page doesn't matter to the SQL compiler. You can reference queries that appear before or after the query that you are authoring.

Some SQL dialects require sub-queries to be aliased, including Postgres and MySQL. E.g. `from ${sales_by_item} as sales_by_item`.

The SQL compiler detects circular and missing references. If a query includes either a circular reference or a missing reference, Evidence will display an error that looks like a syntax error in a normal SQL query. Queries with compiler errors are not sent to your database.

![circular-error-single](/img/circular-error-single.png)
The SQL compiler detects circular and missing references.

## SQL File Queries

Expand Down
Binary file removed sites/docs/static/img/bar-line.png
Binary file not shown.
Binary file removed sites/docs/static/img/compiled-written-toggle.gif
Binary file not shown.

0 comments on commit e82ecf1

Please sign in to comment.