-
Notifications
You must be signed in to change notification settings - Fork 27
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
Official document #90
Conversation
Codecov ReportBase: 92.60% // Head: 92.60% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## develop #90 +/- ##
========================================
Coverage 92.60% 92.60%
========================================
Files 259 259
Lines 3798 3798
Branches 481 481
========================================
Hits 3517 3517
Misses 185 185
Partials 96 96
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
cd16c3b
to
5f981b9
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
67bfc04
to
8eca4ea
Compare
the first version of our official document Co-authored-by: JSYOU <Star2ver.Dev@gmail.com> Co-authored-by: Yi-Cheng Kuo <v6610688@gmail.com>
1181892
to
f8d8ef1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a little typo and suggestions, others LGTM 👍
Thanks so much for building the doc server and uploading documents to here.
packages/doc/docs/quickstart.mdx
Outdated
|
||
```sql | ||
{% req user %} | ||
SELECT COUNT(\*) AS count FROM customers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it should be COUNT(*)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll fix it.
packages/doc/docs/quickstart.mdx
Outdated
LIMIT 1 | ||
``` | ||
|
||
We used the if expression to throw an error when the result equals `0`, VulcanSQL server will stop executing and respond immediately when meeting a {% error %} tag, `"CUSTOMER_NOT_FOUND"` is the error code we want to throw. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the quote to be {% error %}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
packages/doc/docs/quickstart.mdx
Outdated
|
||
```sql | ||
{% req user %} | ||
SELECT COUNT(\*) AS count FROM customers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it should be COUNT(*)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll fix it.
packages/doc/docs/quickstart.mdx
Outdated
LIMIT 1 | ||
``` | ||
|
||
{% set %} tag saved the result from the right side like most programming languages: `var someVar = someVal`, in this example, we saved the query result into `userCount` variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the quote to be {% set %}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
[{"arr":"1,2,3,4,4"}]% | ||
``` | ||
|
||
Otherwise, you will see the above example always print the value to `$[number]` e.g: `$1` and then print the value in the terminal and display the `$1` as key and then shows the value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you assist me to change the $[number]
to $<number>
?
|
||
### Raw Filter | ||
|
||
The `raw` filter is the VulcanSQL custom filer function, which could make your defined variable or dynamic parameter output value directly, it will transform `$[number]` to the value first and if you still have a pipe function after the `raw` , then it will use the output value to do the filter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as here, could you assist me to change the $[number]
to $<number>
, thanks ?
packages/doc/docs/quickstart.mdx
Outdated
|
||
We use `default` filter here to set the fallback value. When users don't send the parameter, we use a default value. | ||
|
||
Unlike the last API, we use {% if %} expression the determine whether render the SQL or not, the queries in if blocks are only sent when the condition is satisfied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the quote to be {% if %}
?
@@ -0,0 +1,323 @@ | |||
# Configuration | |||
|
|||
When using the VulcanSQL and creating the project through `vulcan init`, you will see a file named `vulcan.yaml` under the project root. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using the VulcanSQL and creating the project through `vulcan init`, you will see a file named `vulcan.yaml` under the project root. | |
After creating a VulcanSQL project by `vulcan init`, you will see a file named `vulcan.yaml` under the project root. |
|
||
# Filename of Project Config | ||
|
||
Although the `vulcan.yaml` is the VulcanSQL project config name, but it is not mandatory actually. You could rename the project config file, but VulcanSQL will default use it when you play our command e.g: `vulcan build`, `vulcan serve`, or `vulcan start`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although the `vulcan.yaml` is the VulcanSQL project config name, but it is not mandatory actually. You could rename the project config file, but VulcanSQL will default use it when you play our command e.g: `vulcan build`, `vulcan serve`, or `vulcan start`. | |
Although we said that the `vulcan.yaml` is the VulcanSQL project config name, but it is not mandatory actually. You could rename the project config file, but VulcanSQL will default use it when you play our command e.g: `vulcan build`, `vulcan serve`, or `vulcan start`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for modifying it!
In the VulcanSQL project config, we will provide a section for you to define the project `name` and give the `description` for recording it so you or your partner could know the project's purpose. The `version` will record what VulcanSQL version you used, basically your installed version. | ||
|
||
```yaml | ||
name: my-first-vulcan-project | ||
description: A starter VulcanSQL project | ||
version: 0.2.0 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version in config is the version of their project, which is controlled by uses. It has no relation with VulcanSQL~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for pointing it out.
document-generator: | ||
specs: | ||
- oas3 | ||
folderPath: . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've removed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean folderPath
option only or all of document-generator
?
It is the folderPath
, yes this is my misunderstanding, thanks so much.
If you mean all of document-generator
, it still exists in the vulcan.yaml
template of the cli
package.
Otherwise, VulcanSQL also has some external extensions which we have prepared, so if you would like to use external extensions, you could follow the below structure to define: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, VulcanSQL also has some external extensions which we have prepared, so if you would like to use external extensions, you could follow the below structure to define: | |
VulcanSQL had created some external extensions, if you would like to use these extensions, you could follow the below structure to define them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for modifying it!
`enabled` | ||
|
||
- `default: true` | ||
- `typt: boolean` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `typt: boolean` | |
- `type: boolean` |
packages/doc/docs/quickstart.mdx
Outdated
|
||
```sql | ||
{% req user %} | ||
SELECT COUNT(\*) AS count FROM customers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll fix it.
packages/doc/docs/quickstart.mdx
Outdated
LIMIT 1 | ||
``` | ||
|
||
We used the if expression to throw an error when the result equals `0`, VulcanSQL server will stop executing and respond immediately when meeting a {% error %} tag, `"CUSTOMER_NOT_FOUND"` is the error code we want to throw. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
packages/doc/docs/quickstart.mdx
Outdated
|
||
```sql | ||
{% req user %} | ||
SELECT COUNT(\*) AS count FROM customers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll fix it.
packages/doc/docs/quickstart.mdx
Outdated
LIMIT 1 | ||
``` | ||
|
||
{% set %} tag saved the result from the right side like most programming languages: `var someVar = someVal`, in this example, we saved the query result into `userCount` variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
Description
Use
nx start doc
to start document server.Issue ticket number
closes #52
Additional Context