Skip to content
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

feat(docs): release documentation website #2339

Merged
merged 2 commits into from
Jan 7, 2024
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
14 changes: 7 additions & 7 deletions website/docs/contributing/website.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import { ExternalCodeEmbed } from '@site/src/components/ExternalCodeEmbed';

This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.

---
<hr />

## Environment

You will need these tools installed on your system:

- [Node.js (18.x or higher)](https://nodejs.org/)

---
<hr />

## Development

Expand Down Expand Up @@ -58,7 +58,7 @@ Note that the website has its own _package.json_.
Please, do not install dependencies for the website in **node-mysql2** root.
:::

---
<hr />

## Extras Components

Expand Down Expand Up @@ -100,7 +100,7 @@ You can also utilize React components in the `changes` option.
/>
</FAQ>

---
<hr />

### Stability

Expand All @@ -126,7 +126,7 @@ Available levels: `0`, `1`, `1.1`, `1.2`, `2` and `3`.
<Stability level={2} message='Some message.' />
</FAQ>

---
<hr />

### FAQ

Expand Down Expand Up @@ -157,7 +157,7 @@ import { FAQ } from '@site/src/components/FAQ';
</FAQ>
</FAQ>

---
<hr />

### ExternalCodeEmbed

Expand Down Expand Up @@ -193,7 +193,7 @@ import { ExternalCodeEmbed } from '@site/src/components/ExternalCodeEmbed';
/>
</FAQ>

---
<hr />

## Running Tests

Expand Down
8 changes: 4 additions & 4 deletions website/docs/documentation/00-index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Not only **MySQL2** offers better performance over [Node MySQL][node-mysql], we
- MySQL Compression
- Binary Log Protocol Client

---
<hr />

## Examples

Please check these [examples](/docs/examples) for **MySQL2**.

---
<hr />

## Known incompatibilities with [Node MySQL][node-mysql]

Expand All @@ -54,7 +54,7 @@ Please check these [examples](/docs/examples) for **MySQL2**.
This option could lose precision on the number as Javascript Number is a Float!
:::

---
<hr />

## Other Resources

Expand All @@ -64,7 +64,7 @@ This option could lose precision on the number as Javascript Number is a Float!
- [node-libmysqlclient](https://github.com/Sannis/node-mysql-libmysqlclient) - Bindings to libmysqlclient
- [go-mysql](https://github.com/siddontang/go-mysql) - MySQL Go client (prepared statements, binlog protocol, server)

---
<hr />

## Benchmarks

Expand Down
2 changes: 1 addition & 1 deletion website/docs/documentation/mysql-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- **connect**
- new incoming connection.

---
<hr />

## Connection

Expand Down
16 changes: 8 additions & 8 deletions website/docs/documentation/typescript-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm install --save-dev @types/node
Requires **TypeScript** `>=4.5.2`.
:::

---
<hr />

## Usage

Expand Down Expand Up @@ -90,7 +90,7 @@ The `rows` output will be these possible types:

In this example, you need to manually check the output types

---
<hr />

## Type Specification

Expand Down Expand Up @@ -156,7 +156,7 @@ conn.query<RowDataPacket[]>('SHOW TABLES FROM `test`;', (_err, rows) => {
});
```

---
<hr />

### RowDataPacket[][]

Expand Down Expand Up @@ -186,7 +186,7 @@ conn.query<RowDataPacket[][]>(sql, (_err, rows) => {
});
```

---
<hr />

### ResultSetHeader

Expand Down Expand Up @@ -244,7 +244,7 @@ conn.query<ResultSetHeader>(sql, (_err, result) => {
});
```

---
<hr />

### ResultSetHeader[]

Expand Down Expand Up @@ -306,7 +306,7 @@ conn.query<ResultSetHeader[]>(sql, (_err, results) => {
});
```

---
<hr />

### ProcedureCallPacket

Expand Down Expand Up @@ -379,7 +379,7 @@ By using `SELECT` and `SHOW` queries in a **Procedure Call**, it groups the resu

For `ProcedureCallPacket<RowDataPacket[]>`, please see the following examples.

---
<hr />

### OkPacket

Expand All @@ -395,7 +395,7 @@ For `ProcedureCallPacket<RowDataPacket[]>`, please see the following examples.
}
/>

---
<hr />

## Examples

Expand Down
12 changes: 6 additions & 6 deletions website/docs/examples/connections/create-connection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ connection.addListener('error', (err) => {
</TabItem>
</Tabs>

---
<hr />

## createConnection(config)

Expand Down Expand Up @@ -102,7 +102,7 @@ connection.addListener('error', (err) => {
</TabItem>
</Tabs>

---
<hr />

## createConnection(config) — SHA1

Expand Down Expand Up @@ -148,7 +148,7 @@ connection.addListener('error', (err) => {
</TabItem>
</Tabs>

---
<hr />

## createConnection(config) — SSL

Expand Down Expand Up @@ -208,7 +208,7 @@ connection.addListener('error', (err) => {
</TabItem>
</Tabs>

---
<hr />

## createConnection(config) — RDS SSL

Expand Down Expand Up @@ -297,7 +297,7 @@ connectionquery('SHOW `status` LIKE "Ssl_cipher"', function (err, res) {
- [#2119 — fix: make startTls code compatible with Bun](https://github.com/sidorares/node-mysql2/pull/2119)
- [#2131 — Update Amazon RDS SSL CA cert](https://github.com/sidorares/node-mysql2/pull/2131)

---
<hr />

## createConnection(config) — Socks

Expand Down Expand Up @@ -379,7 +379,7 @@ connection.execute('SELECT SLEEP(1) AS `qqq`', (err, rows, fields) => {

:::

---
<hr />

## Glossary

Expand Down
34 changes: 18 additions & 16 deletions website/docs/examples/connections/create-pool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Don't forget to release the connection when finished by using:

:::

---
<hr />

## createPool(config)

Expand Down Expand Up @@ -140,7 +140,7 @@ Don't forget to release the connection when finished by using:

:::

---
<hr />

## createPool(config) — SHA1

Expand Down Expand Up @@ -207,7 +207,7 @@ Don't forget to release the connection when finished by using:

:::

---
<hr />

## createPool(config) — SSL

Expand Down Expand Up @@ -288,7 +288,7 @@ Don't forget to release the connection when finished by using:

:::

---
<hr />

## createPool(config) — RDS SSL

Expand Down Expand Up @@ -398,7 +398,7 @@ Don't forget to release the connection when finished by using:
- [#2119 — fix: make startTls code compatible with Bun](https://github.com/sidorares/node-mysql2/pull/2119)
- [#2131 — Update Amazon RDS SSL CA cert](https://github.com/sidorares/node-mysql2/pull/2131)

---
<hr />

## createPool(config) — Socks

Expand Down Expand Up @@ -472,22 +472,24 @@ pool.execute('SELECT SLEEP(1) AS `qqq`', (err, rows, fields) => {

:::

---
<hr />

## Glossary

### PoolOptions

> **PoolOptions** extends all options from **ConnectionOptions**:
>
> <FAQ title='ConnectionOptions Specification'>
> <ExternalCodeEmbed
> language='ts'
> url='https://raw.githubusercontent.com/sidorares/node-mysql2/master/typings/mysql/lib/Connection.d.ts'
> extractMethod='ConnectionOptions'
> methodType='interface'
> />
> </FAQ>
<blockquote>
**PoolOptions** extends all options from **ConnectionOptions**:

<FAQ title='ConnectionOptions Specification'>
<ExternalCodeEmbed
language='ts'
url='https://raw.githubusercontent.com/sidorares/node-mysql2/master/typings/mysql/lib/Connection.d.ts'
extractMethod='ConnectionOptions'
methodType='interface'
/>
</FAQ>
</blockquote>

<FAQ title='PoolOptions Specification'>
<ExternalCodeEmbed
Expand Down
34 changes: 18 additions & 16 deletions website/docs/examples/connections/createPoolCluster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Don't forget to release the connection when finished by using:

:::

---
<hr />

## add(group, config)

Expand Down Expand Up @@ -152,7 +152,7 @@ Don't forget to release the connection when finished by using:

:::

---
<hr />

## add(group, config) — SHA1

Expand Down Expand Up @@ -225,7 +225,7 @@ Don't forget to release the connection when finished by using:

:::

---
<hr />

## add(group, config) — SSL

Expand Down Expand Up @@ -312,7 +312,7 @@ Don't forget to release the connection when finished by using:

:::

---
<hr />

## add(group, config) — RDS SSL

Expand Down Expand Up @@ -428,7 +428,7 @@ Don't forget to release the connection when finished by using:
- [#2119 — fix: make startTls code compatible with Bun](https://github.com/sidorares/node-mysql2/pull/2119)
- [#2131 — Update Amazon RDS SSL CA cert](https://github.com/sidorares/node-mysql2/pull/2131)

---
<hr />

## add(group, config) — Socks

Expand Down Expand Up @@ -512,22 +512,24 @@ poolNamespace.execute('SELECT SLEEP(1) AS `qqq`', (err, rows, fields) => {

:::

---
<hr />

## Glossary

### PoolOptions

> **PoolOptions** extends all options from **ConnectionOptions**:
>
> <FAQ title='ConnectionOptions Specification'>
> <ExternalCodeEmbed
> language='ts'
> url='https://raw.githubusercontent.com/sidorares/node-mysql2/master/typings/mysql/lib/Connection.d.ts'
> extractMethod='ConnectionOptions'
> methodType='interface'
> />
> </FAQ>
<blockquote>
**PoolOptions** extends all options from **ConnectionOptions**:

<FAQ title='ConnectionOptions Specification'>
<ExternalCodeEmbed
language='ts'
url='https://raw.githubusercontent.com/sidorares/node-mysql2/master/typings/mysql/lib/Connection.d.ts'
extractMethod='ConnectionOptions'
methodType='interface'
/>
</FAQ>
</blockquote>

<FAQ title='PoolOptions Specification'>
<ExternalCodeEmbed
Expand Down
Loading
Loading