Skip to content

Commit

Permalink
merge install and load into a single page
Browse files Browse the repository at this point in the history
  • Loading branch information
Tishj committed Sep 11, 2024
1 parent 38bde67 commit 71bae7b
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 72 deletions.
4 changes: 4 additions & 0 deletions _data/menu_docs_dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@
{
"page": "VACUUM",
"url": "vacuum"
},
{
"page": "LOAD/INSTALL",
"url": "load_and_install"
}
]
},
Expand Down
25 changes: 0 additions & 25 deletions docs/sql/statements/install.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/sql/statements/load.md

This file was deleted.

49 changes: 49 additions & 0 deletions docs/sql/statements/load_and_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
layout: docu
title: LOAD/INSTALL Statements
railroad: statements/load_and_install.js
---

# INSTALL

The `INSTALL` statement downloads an extension so it can be loaded into a duckdb session.

## Examples

Install the [`httpfs`]({% link docs/extensions/httpfs/overview.md %}) extension:

```sql
INSTALL httpfs;
```

Install the h3 [community extension]({% link docs/extensions/community_extensions.md %}):

```sql
INSTALL h3 from community;
```

## Syntax

<div id="rrdiagram2"></div>

# LOAD

The `LOAD` statement loads an installed duckdb extension into the current session.

## Examples

Load the [`httpfs`]({% link docs/extensions/httpfs/overview.md %}) extension:

```sql
LOAD httpfs;
```

Load the [`spatial`]({% link docs/extensions/spatial.md %}) extension:

```sql
LOAD spatial;
```

## Syntax

<div id="rrdiagram1"></div>
21 changes: 0 additions & 21 deletions js/statements/load.js

This file was deleted.

14 changes: 13 additions & 1 deletion js/statements/install.js → js/statements/load_and_install.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
function GenerateLoad(options = {}) {
return Diagram([
AutomaticStack([
Keyword("LOAD"),
Expression("extension-name")
])
])
}

function GenerateInstall(options = {}) {
return Diagram([
AutomaticStack([
Expand Down Expand Up @@ -27,7 +36,10 @@ function GenerateInstall(options = {}) {

function Initialize(options = {}) {
document.getElementById("rrdiagram1").classList.add("limit-width");
document.getElementById("rrdiagram1").innerHTML = GenerateInstall(options).toString();
document.getElementById("rrdiagram1").innerHTML = GenerateLoad(options).toString();

document.getElementById("rrdiagram2").classList.add("limit-width");
document.getElementById("rrdiagram2").innerHTML = GenerateInstall(options).toString();
}

function Refresh(node_name, set_node) {
Expand Down

0 comments on commit 71bae7b

Please sign in to comment.