Skip to content

docs: fix broken link, add clarity to plugins doc #2813

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

Merged
merged 1 commit into from
Oct 6, 2023
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
16 changes: 9 additions & 7 deletions docs/guides/plugins.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Authoring plugins
# Using plugins

To use plugins, you must be using [Version 2](../reference/config.md) of
To use plugins, you must be using [Version 2](../reference/config.md#version-2) of
the configuration file. The top-level `plugins` array defines the available
plugins.

## WASM plugins

> WASM plugins are fully sandboxed. Plugins do not have access to the network,
> WASM plugins are fully sandboxed; they do not have access to the network,
> filesystem, or environment variables.

In the `codegen` section, the `out` field dictates what directory will contain
the new files. The `plugin` key must reference a plugin defined in the
top-level `plugins` map. The `options` are serialized to a string and passed on
to the plugin itself.
top-level `plugins` map. Any `options` are serialized to a string as JSON and
passed on to the plugin itself.


```yaml
Expand All @@ -29,6 +29,8 @@ sql:
codegen:
- out: gen
plugin: greeter
options:
lang: en-US
```

For a complete working example see the following files:
Expand All @@ -44,8 +46,8 @@ For a complete working example see the following files:

In the `codegen` section, the `out` field dictates what directory will contain
the new files. The `plugin` key must reference a plugin defined in the
top-level `plugins` map. The `options` are serialized to a string and passed on
to the plugin itself.
top-level `plugins` map. Any `options` are serialized to a string as JSON and
passed on to the plugin itself.

```yaml
version: '2'
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/datatypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
database types to Go types. Choices for more complex types are described below.

If you're unsatisfied with the default, you can override any type using the
[overrides list](config.html#type-overriding) in your `sqlc` config file.
[overrides list](./config.html#type-overriding) in your `sqlc` config file.

## Arrays

Expand Down