Merge branch 'release' of https://git.pwcca.eu/Sam/awSQL into release

This commit is contained in:
Sam 2025-03-14 23:49:15 +01:00
commit 203a7e6f9f
30 changed files with 0 additions and 20123 deletions

View File

@ -1,20 +0,0 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View File

@ -1,41 +0,0 @@
# Website
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
### Installation
```
$ yarn
```
### Local Development
```
$ yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Using SSH:
```
$ USE_SSH=true yarn deploy
```
Not using SSH:
```
$ GIT_USER=<Your GitHub username> yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

View File

@ -1,8 +0,0 @@
{
"label": "Classes",
"position": 2,
"link": {
"type": "generated-index",
"description": "Here you can find all classes awSQL uses"
}
}

View File

@ -1,62 +0,0 @@
---
sidebar_position: 9
---
# AlterTable
Alters a table.
## Methods
### selectDatabase()
&rarr; (`database` = __String__) &rarr; `this`
Selects a different database for this query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `database` | __String__ | Name of the database to select |
**Returns**
&rarr; `this`
***
### structure()
&rarr; (`structure` = [Structure](./structure)) &rarr; `this`
The new desired structure for the table to get.
- Drops columns that are existing in the current table but not in the given structure
- Adds columns that are missing in the current table
- Modifies all other columns where at least one datatype is not matching
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `structure` | [Structure](./structure) | New structure definition for the table |
**Returns**
&rarr; `this`
***
### execute()
`async` &rarr; () &rarr; __any__
:::warning Possible crash
[structure()](#structure) must always be given.
:::
Executes the prepared query.
**Returns**
&rarr; [Instance.checkStructure()](./instance#checkstructure) - Checks the structure afterwards and returns the check result
***

View File

@ -1,102 +0,0 @@
---
sidebar_position: 1
---
# awSQL
This is the default exported module that holds all Instances and manages them.
It does not provide any functionality on top of managing instances globally.
## Methods
### createInstance()
&rarr; (`hostname` = __String__, `username` = __String__, `password` = __String__, `options`? = \{`charset`?: __String__, `defaultDatabase`?: __String__, `multipleStatements`?: __Boolean__, `insecureAuth`?: __Boolean__, `customIdentifier`?: __String__, `isDefault`?: __Boolean__\}) &rarr; [Instance](./instance)
Creates a new instance to connect to a database.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `hostname` | __String__ | The hostname where the database is hosted |
| `username` | __String__ | Username to connect with |
| `password` | __String__ | Password |
| `options` __optional__ | __Object__ | Additional options |
| &rarr; `options.charset` __optional__ | __String__ | The charset to use |
| &rarr; `options.defaultDatabase` __optional__ | __String__ | The default database to select for queries |
| &rarr; `options.multipleStatements` __optional__ | __Boolean__ | Whether to allow multiple statements in a single query. Defaults to `false` |
| &rarr; `options.insecureAuth` __optional__ | __Boolean__ | Whether insecure authentication methods should be allowed. Defaults to `false` |
| &rarr; `options.customIdentifier` __optional__ | __String__ | Sets a custom identifier for this instance. Instances can be fetched by [getInstance()](#getInstance) with this identifier. If not set, the identifier will be "`username`@`hostname`" by default. |
| &rarr; `options.isDefault` __optional__ | __Boolean__ | Whether this instance is returned by default via [getInstance()](#getInstance) if the given identifier is empty or not retrievable |
:::warning Possible errors
This might crash if either of these situations happen:
- `password` is empty
- `username` is empty
- An instance with the same `identifier` already exists
:::
**Returns**
&rarr; [Instance](./instance)
***
### getInstance()
&rarr; (`identifier`? = __String__) &rarr; [Instance](./instance) / __undefined__
Returns an already defined instance with the given `identifier`.
If a default instance was set it returns said instance if the `identifier` is empty.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `identifier` __optional__ | __String__ | The instance name to retrieve. Note: If not set with `options.customIdentifier` upon creation instances will be identified by "`username`@`hostname`".<br/> If not given it returns the defined default instance. |
**Returns**
- [Instance](./instance) - Instance was found
- __undefined__
***
### listInstances()
&rarr; () &rarr; __Array__\<__String__\>
Returns a list of defined instance identifiers
**Returns**
&rarr; __Array__\<__String__\>
***
### deleteInstance()
&rarr; (`identifier` = __String__) &rarr; __true__
Deletes an instance and closes any open connection
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `identifier` __optional__ | __String__ | The instance to delete. Note: If not set with `options.customIdentifier` upon creation instances will be identified by "`username`@`hostname`". |
:::warning Possible crash
This might crash if either of these situations happen:
- `identifier` is empty
- To delete the default instance you must provide the `identifier` of the default instance.
- `identifier` is not of type __String__
- No instance with the given `identifier` was found
:::
**Returns**
&rarr; __true__
:::info
Always returns true, as it will throw if any error happens to be sure any deletion was intended and correctly called.
:::

View File

@ -1,75 +0,0 @@
---
sidebar_position: 8
---
# CreateTable
Creates a new table with defined structure.
## Methods
### selectDatabase()
&rarr; (`database` = __String__) &rarr; `this`
Selects a different database for this query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `database` | __String__ | Name of the database to select |
**Returns**
&rarr; `this`
***
### name()
&rarr; (`name` = __String__) &rarr; `this`
Sets the name of the new table.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name for the table |
**Returns**
&rarr; `this`
***
### structure()
&rarr; (`structure` = [Structure](./structure)) &rarr; `this`
The desired structure for the table to get.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `structure` | [Structure](./structure) | Structure for the table. |
**Returns**
&rarr; `this`
***
### execute()
`async` &rarr; () &rarr; __any__
:::warning Possible crash
[structure()](#structure) must always be given.
:::
Executes the prepared query.
**Returns**
&rarr; __any__ - The result of 'CREATE TABLE [...]'-query
***

View File

@ -1,75 +0,0 @@
---
sidebar_position: 5
---
# Delete
Performs a query to delete rows from a table.
:::warning Possible crash
To prevent accidental deletion of all rows, this will throw an error on [execute()](#execute) if no [where()](#where) was defined.
To enable the deletion of all rows use [force()](#force).
:::
## Methods
### selectDatabase()
&rarr; (`database` = __String__) &rarr; `this`
Selects a different database for this query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `database` | __String__ | Name of the database to select |
**Returns**
&rarr; `this`
***
### where()
&rarr; (`string` = __String__, `values` = __Array__\<__any__\>) &rarr; `this`
Adds a where-clause to the query
- Values should be set as ? in the string and given in left-to-right order via the 'values'-array to minimize the risk of sql-injection
- If you are using joins, specify the table and column together: table.column
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `string` | __String__ | The where-clause as a string with ? representing each values. |
| `values` | __Array__\<__any__\> | Array containing values replacing the ? in the string (from left to right) |
**Returns**
&rarr; `this`
***
### force()
&rarr; () &rarr; `this`
Enables deletion of all rows.
**Returns**
&rarr; `this`
***
### execute()
`async` &rarr; () &rarr; __any__
Executes the prepared query.
**Returns**
&rarr; __any__ - Query result
***

View File

@ -1,54 +0,0 @@
---
sidebar_position: 4
---
# Insert
Performs a query to insert new data into a table.
## Methods
### selectDatabase()
&rarr; (`database` = __String__) &rarr; `this`
Selects a different database for this query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `database` | __String__ | Name of the database to select |
**Returns**
&rarr; `this`
***
### data()
&rarr; (`objects` = __Array__\<__Object__\>) &rarr; `this`
The data (rows) to insert.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `objects` | __Array__\<__Object__\> | Array containing objects to insert, where the key represent the column-name. All objects must have the same key-structure! |
**Returns**
&rarr; `this`
***
### execute()
`async` &rarr; () &rarr; __any__
Executes the prepared query.
**Returns**
&rarr; __any__ - Query result
***

View File

@ -1,354 +0,0 @@
---
sidebar_position: 2
---
# Instance
Holds connection data and is the gateway to performing queries.
Instances can be managed via the default export [awSQL](./awsql)
## Methods
### connect()
`Promise` &rarr; () &rarr; __String__
Connects the instance.
:::warning Possible crash
Throws an error whenever the connection fails with an error
:::
**Returns**
&rarr; __String__ - A connection string in the following format: "Connected to `host` with user `user`"
***
### destroy()
&rarr; () &rarr; __true__
Destroys the connection
**Returns**
&rarr; __true__
***
### queryRaw()
`async` &rarr; (`queryString` = __String__, `values`? = __Array__\<__any__\>) &rarr; __any__
Performs a raw query with the given sql-string.
To prevent sql-injections use ? and push your values in order into the `values` array.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `queryString` | __String__ | The sql-query to perform |
| `values` | __Array__\<__any__\> | ? in the query string will be replaced by this values in order |
**Returns**
&rarr; __any__ - Whatever the query returns
***
### getDatabases()
`async` &rarr; (`excludeSchema`? = __Boolean__) &rarr; __Array__\<__String__\>
Returns a list of database names the user has access to
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `excludeSchema` __option__ | __Boolean__ | Whether to exclude the default database 'information_schema' |
**Returns**
&rarr; __Array__\<__String__\>
***
### selectDatabase()
&rarr; (`name` = __String__) &rarr; `this`
Selects a default database for future queries
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | The database to select |
**Returns**
&rarr; `this`
***
### getTables()
&rarr; (`database`? = __String__) &rarr; __Array__\<__String__\>
Returns a list of tables for the selected database
:::warning Possible crash
`options.multipleStatemens` must have been set to __true__ at creation of this instance for this to work. If not this will throw an error.
:::
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `database` __optional__ | __String__ | Database to get tables of. Can be empty as long as a default database was set with 'selectDatabase' |
**Returns**
&rarr; __Array__\<__String__\>
***
### select()
&rarr; (`from` = __String__, `...columns`? = __String__) &rarr; [Select](./select)
Prepares a new select query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `from` | __String__ | Name of the table to select from |
| `...columns` __optional__ | __String__ | Names of the columns to include in the query. Leave empty to select all (`*`) |
**Returns**
&rarr; [Select](./select)
***
### insert()
&rarr; (`into` = __String__) &rarr; [Insert](./insert)
Prepares a new query to insert data.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `into` | __String__ | Name of the table to insert into |
**Returns**
&rarr; [Insert](./insert)
***
### delete()
&rarr; (`from` = __String__) &rarr; [Delete](./delete)
Prepares a new query to delete data.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `from` | __String__ | Name of the table to delete from |
**Returns**
&rarr; [Delete](./delete)
***
### update()
&rarr; (`table` = __String__) &rarr; [Update](./update)
Prepares a new query to update data.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `table` | __String__ | Name of the table to update data of |
**Returns**
&rarr; [Update](./update)
***
### dropDatabase()
`async` &rarr; (`database` = __String__) &rarr; __any__
Drops a whole database
- Requires admin privileges
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `database` | __String__ | The name of the database to drop |
**Returns**
&rarr; __any__ - Whatever the query result is
***
### dropTable()
`async` &rarr; (`table` = __String__) &rarr; __any__
Drops a whole table.
:::warning Possible crash
A default database must be set with [selectDatabase()](#selectdatabase)
:::
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `table` | __String__ | The name of the table to drop |
**Returns**
&rarr; __any__ - Whatever the query result is
***
### createDatabase()
`async` &rarr; (`name` = __String__) &rarr; __any__
Creates a new database.
- Requires admin privileges
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | The name of the database to create |
**Returns**
&rarr; __any__ - Whatever the query result is
***
### createTable()
&rarr; (`name` = __String__) &rarr; [CreateTable](./create-table)
Prepares to create a new table.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | The name of the table to create |
**Returns**
&rarr; [CreateTable](./create-table)
***
### alterTable()
&rarr; (`name` = __String__) &rarr; [AlterTable](./alter-table)
Prepares to alter a table.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | The name of the table to alter |
**Returns**
&rarr; [AlterTable](./alter-table)
***
### createStructure()
&rarr; () &rarr; [Structure](./structure)
Creates a new structure.
**Returns**
&rarr; [Structure](./structure)
***
### getStructure()
`async` &rarr; (`table` = __String__, `database`? = __String__) &rarr; [Structure](./structure)
Returns the structure object of a table.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `table` | __String__ | The name of the table to get structure of |
| `database` __optional__ | __String__ | Name of the underlying database. Can be empty when a default database was set with [selectDatabase()](#selectdatabase) |
**Returns**
&rarr; [Structure](./structure)
***
### checkStructure()
`async` &rarr; (`table` = __String__, `desiredStructure` = [Structure](./structure), `database`? = __String__) &rarr; __Object__
Checks the structure of a table against a given structure.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `table` | __String__ | The name of the table to check |
| `desiredStructure` | [Structure](./structure) | The structure to check against |
| `database` __optional__ | __String__ | Name of the underlying database. Can be empty when a default database was set with [selectDatabase()](#selectdatabase) |
**Returns**
&rarr; __Object__
```js
{
errors: [<...String>], // Holds error messages
passed: [<...String>] // Holds success messages
}
```
:::info
If `errors.length` is `0` the structure is correct
:::
***
### total()
`async` &rarr; (`table` = __String__) &rarr; __Number__
Returns the total amount of rows of a table.
- A default database must be set
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `table` | __String__ | The name of the table to check. |
**Returns**
&rarr; __Number__
***
### isConnected()
&rarr; () &rarr; __Boolean__
Returns whether the connection has been established.
**Returns**
&rarr; __Boolean__

View File

@ -1,242 +0,0 @@
---
sidebar_position: 3
---
# Select
Performs a query to retrieve data from a table.
## Methods
### selectDatabase()
&rarr; (`database` = __String__) &rarr; `this`
Selects a different database for this query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `database` | __String__ | Name of the database to select |
**Returns**
&rarr; `this`
***
### distinct()
&rarr; () &rarr; `this`
Adds the 'distinct' keyword to this query
- With 'distinct' only unique values are returned
**Returns**
&rarr; `this`
***
### where()
&rarr; (`string` = __String__, `values` = __Array__\<__any__\>) &rarr; `this`
Adds a where-clause to the query
- Values should be set as ? in the string and given in left-to-right order via the 'values'-array to minimize the risk of sql-injection
- If you are using joins, specify the table and column together: table.column
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `string` | __String__ | The where-clause as a string with ? representing each values. |
| `values` | __Array__\<__any__\> | Array containing values replacing the ? in the string (from left to right) |
**Returns**
&rarr; `this`
***
### having()
&rarr; (`string` = __String__, `values` = __Array__\<__any__\>) &rarr; `this`
Same as [where()](#where) but allows for aggregation.
- Values should be set as ? in the string and given in left-to-right order via the 'values'-array to minimize the risk of sql-injection
- If you are using joins, specify the table and column together: table.column
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `string` | __String__ | The having-clause with possible aggregation ? representing each values. |
| `values` | __Array__\<__any__\> | Array containing values replacing the ? in the string (from left to right) |
**Returns**
&rarr; `this`
***
### order()
&rarr; (`column` = __String__, `desc` = __Boolean__, `aggregation` = __Enum__) &rarr; `this`
Adds a new sort order.
- Can be used multiple times to order by multiple columns
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `column` | __String__ | Column to order by |
| `desc` | __Boolean__ | Sort descending? Defaults to `false` |
| `aggregation` | __Enum__ &rarr; `MIN`/`MAX`/`COUNT`/`SUM`/`AVG` | The aggregation type to use |
**Returns**
&rarr; `this`
***
### count()
&rarr; (`doParse` = __Boolean__) &rarr; `this`
Counts the number of entries of the first selected column.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `doParse` | __Boolean__ | If `true` the query will only return a __Number__ of entries. Defaults to `false`. |
**Returns**
&rarr; `this`
***
### sum()
&rarr; (`doParse` = __Boolean__) &rarr; `this`
Sums numerical rows of the first selected column.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `doParse` | __Boolean__ | If `true` the query will only return a __Number__ of entries. Defaults to `false`. |
**Returns**
&rarr; `this`
***
### avg()
&rarr; (`doParse` = __Boolean__) &rarr; `this`
Averages numerical rows of the first selected column.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `doParse` | __Boolean__ | If `true` the query will only return a __Number__ of entries. Defaults to `false`. |
**Returns**
&rarr; `this`
***
### group()
&rarr; (`...columns` = __String__) &rarr; `this`
Groups rows that have the same values into summary rows.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `...columns` | __String__ | The columns to group by |
**Returns**
&rarr; `this`
***
### join()
&rarr; (`type` = __Enum__, `table` = __String__, `onOriginalColumn` = __String__, `onJoinedColumn` = __String__, `...columns` = __String__) &rarr; `this`
Adds a new join to the query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `type` | __Enum__ &rarr; `LEFT`/`INNER`/`RIGHT`/`FULL OUTER` | The join type |
| `table` | __String__ | Table to join on |
| `onOriginalColumn` | __String__ | Column name on the original table to check agains |
| `onJoinedColumn` | __String__ | Column name of the join table to check against |
| `...columns` | __String__ | The columns to join. OG-columns must be set! |
**Returns**
&rarr; `this`
***
### limit()
&rarr; (`number` = __Number__, `offset` = __Number__) &rarr; `this`
Limits the query and specifies an offset to start at.
:::warning
`offset` has no default value and therefore must not be empty!
:::
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `number` | __Number__ | Limits the query by specified rows |
| `offset` | __Number__ | Offset to start at. |
**Returns**
&rarr; `this`
***
### pagination()
&rarr; (`page` = __Number__, `itemsPerPage` = __Number__) &rarr; `this`
Paginates the query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `page` | __Number__ | The page to get (Minimum 1) |
| `itemsPerPage` | __Number__ | How many items a page should have |
**Returns**
&rarr; `this`
***
### execute()
`async` &rarr; () &rarr; __any__
Executes the prepared query.
**Returns**
&rarr; __any__ - Query result
***

View File

@ -1,579 +0,0 @@
---
sidebar_position: 7
---
# Structure
Defines a new Table structure.
## Methods
### constructor()
&rarr; (`tableDescription`? = __Array__\<[ColumnStructure](../typedefs/column-structure)\>) &rarr; `this`
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `tableDescription` __optional__ | __Array__\<[ColumnStructure](../typedefs/column-structure)\> | An array holding a list of column structure objects to define columns with.<br/><br/>You can get a `tableDescription` from a structure with the [get()](#get) method, store it and load it again by creating a [Structure](#structure) with it in this constructor. |
**Returns**
&rarr; `this`
***
### get()
&rarr; () &rarr; __Array__\<[ColumnStructure](../typedefs/column-structure)\>
Returns an array containing all defined columns in the [ColumnStructure](../typedefs/column-structure) object.
With this you can save the structure and load it again by passing it to the [constructor](#constructor) of a new [Structure](#structure).
**Returns**
&rarr; __Array__\<[ColumnStructure](../typedefs/column-structure)\>
***
### drop()
&rarr; (`name` = __String__) &rarr; `this`
Drops (removes) a column from this structure.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | The column name to drop |
**Returns**
&rarr; `this`
***
### char()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'char' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of characters to store in this column. <br/><br/>- _Min_: 0<br/>- _Max_: 255<br/>- _Default_: 1 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### varchar()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'varchar' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of characters to store in this column. <br/><br/>- _Min_: 0<br/>- _Max_: 255<br/>- _Default_: 1 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### binary()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'binary' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Default_: 1 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### varbinary()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'varbinary' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 0<br/>- _Default_: 1 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### tinyblob()
&rarr; (`name` = __String__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'tinyblob' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### tinytext()
&rarr; (`name` = __String__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'tinytext' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### text()
&rarr; (`name` = __String__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'text' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### blob()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'blob' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of characters to store in this column. <br/><br/>- _Min_: 0<br/>- _Max_: 65535<br/>- _Default_: 65535 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### mediumtext()
&rarr; (`name` = __String__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'mediumtext' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### longtext()
&rarr; (`name` = __String__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'longtext' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### longblob()
&rarr; (`name` = __String__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'longblob' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### enum()
&rarr; (`name` = __String__, `vals`? = __Array__\<__String__\>, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'enum' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `vals` | __Array__\<__String__\> | Array of possible values for this column. |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### set()
&rarr; (`name` = __String__, `vals`? = __Array__\<__String__\>, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'enum' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `vals` | __Array__\<__String__\> | Array of possible values for this column. |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### bit()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'bit' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Max_: 64<br/>- _Default_: 1 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### tinyint()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'tinyint' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Max_: 255<br/>- _Default_: 255 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### bool()
&rarr; (`name` = __String__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'bool' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### smallint()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'smallint' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Max_: 255<br/>- _Default_: 255 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### mediumint()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'mediumint' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Max_: 255<br/>- _Default_: 255 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### int()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'int' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Max_: 255<br/>- _Default_: 255 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### bigint()
&rarr; (`name` = __String__, `size`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'bigint' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Max_: 255<br/>- _Default_: 255 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### float()
&rarr; (`name` = __String__, `p`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'float' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `p` __optional__ | __Number__ | Precision. <br/><br/>- _Min_: 1<br/>- _Max_: 53<br/>- _Default_: 25 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### double()
&rarr; (`name` = __String__, `size`? = __Number__, `d`? = __Number__ `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'double' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Default_: 16 |
| `d` __optional__ | __Number__ | Double precision. <br/><br/>- _Min_: 1<br/>- _Default_: 8 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### decimal()
&rarr; (`name` = __String__, `size`? = __Number__, `d`? = __Number__ `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'decimal' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `size` __optional__ | __Number__ | Maximum length of data. <br/><br/>- _Min_: 1<br/>- _Default_: 16 |
| `d` __optional__ | __Number__ | Double precision. <br/><br/>- _Min_: 1<br/>- _Default_: 8 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### date()
&rarr; (`name` = __String__,`options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'date' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### datetime()
&rarr; (`name` = __String__, `fsp`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'datetime' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `fsp` __optional__ | __Number__ | Fractional second precision. <br/><br/>- _Min_: 0<br/>- _Max_: 6<br/>- _Default_: 0 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### timestamp()
&rarr; (`name` = __String__, `fsp`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'timestamp' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `fsp` __optional__ | __Number__ | Fractional second precision. <br/><br/>- _Min_: 0<br/>- _Max_: 6<br/>- _Default_: 0 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### time()
&rarr; (`name` = __String__, `fsp`? = __Number__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'time' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `fsp` __optional__ | __Number__ | Fractional second precision. <br/><br/>- _Min_: 0<br/>- _Max_: 6<br/>- _Default_: 0 |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***
### year()
&rarr; (`name` = __String__, `options`? = [ConstraintOptions](../typedefs/constraint-options)) &rarr; `this`
Adds a new column of data type 'year' to this structure
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `name` | __String__ | Name of the column |
| `options` __optional__ | [ConstraintOptions](../typedefs/constraint-options) | Additional constraint options |
**Returns**
&rarr; `this`
***

View File

@ -1,92 +0,0 @@
---
sidebar_position: 6
---
# Update
Performs a query to update data in a table.
:::warning Possible crash
To prevent accidental update of all rows, this will throw an error on [execute()](#execute) if no [where()](#where) was defined.
To enable the update of all rows use [force()](#force).
:::
## Methods
### data()
&rarr; (`object` = __Object__) &rarr; `this`
Updates all matching rows with the given object.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `object` | __Object__ | The object with the data to update to. Keys represent column names. |
**Returns**
&rarr; `this`
***
### selectDatabase()
&rarr; (`database` = __String__) &rarr; `this`
Selects a different database for this query.
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `database` | __String__ | Name of the database to select |
**Returns**
&rarr; `this`
***
### force()
&rarr; () &rarr; `this`
Enables update of all rows.
**Returns**
&rarr; `this`
***
### where()
&rarr; (`string` = __String__, `values` = __Array__\<__any__\>) &rarr; `this`
Adds a where-clause to the query
- Values should be set as ? in the string and given in left-to-right order via the 'values'-array to minimize the risk of sql-injection
- If you are using joins, specify the table and column together: table.column
**Parameters**
| Parameter | Type | Description |
| -- | -- | -- |
| `string` | __String__ | The where-clause as a string with ? representing each values. |
| `values` | __Array__\<__any__\> | Array containing values replacing the ? in the string (from left to right) |
**Returns**
&rarr; `this`
***
### execute()
`async` &rarr; () &rarr; __any__
Executes the prepared query.
**Returns**
&rarr; __any__ - Query result
***

View File

@ -1,55 +0,0 @@
---
sidebar_position: 1
slug: /
---
# Introduction
:::info Not finished
This documentation is far from being finished.<br/>
It holds the most useful information, but lacks depth and examples.<br/>
It will be expanded in the near future.
:::
awSQL is a fast and reliable database query tool.
It is designed to minimize the risk of sql-injections while maximizing usability and safety.
It prevents you from altering a whole set of rows by accident.
awSQL is designed to programmatically work with databases in an obvious manner. No more writing pesky and confusing sql-queries
## Getting Started
To get started all you need is:
- An hosted database
- Your credentials
- The `mysql` module from npm.
To install the `mysql` module, type:
```shell showLineNumbers
npm install mysql
```
&rarr; Next move the /awSQL folder into your workspace.
Now you can access the default exports:
```js index.js showLineNumbers
const {awSQL, Structure} = require("./awSQL");
const instance = awSQL.createInstance("localhost", "myUser", "myPass");
instance.connect();
// Do stuff
```
## Exports
awSQL exports 2 modules to use:
- [awSQL](./classes/awSQL) as an instance
- [Structure](./classes/structure)

View File

@ -1,8 +0,0 @@
{
"label": "Typedefs",
"position": 2,
"link": {
"type": "generated-index",
"description": "Here you can find all type definitions used by awSQL"
}
}

View File

@ -1,76 +0,0 @@
---
sidebar_position: 1
---
# ColumnStructure
`Object`
This defines a single column object used by [Structure](../classes/structure).
## Example structure
```js
{
Field: "Column name",
Type: "Column type",
Null: "YES",
Key: "PRI",
Default: "Some default value",
Extra: ""
}
```
## Properties
### .Field
&rarr; __String__
The column name.
***
### .Type
&rarr; __String__
The column type.
***
### .Null
&rarr; __Enum__ &rarr; `YES`/`NO`
Whether the column allows null-values.
***
### .Key
&rarr; __Enum__ &rarr; ` `/`PRI`/`MUL`/`UNI`
Key-Values for the table.
- ` `(Empty) = None
- `PRI` = Primary
- `MUL` = Indexed
- `UNI` = Unique
***
### .Default
&rarr; __String__ / __null__
Default value for a new row.
***
### .Extra
&rarr; __Enum__ &rarr; ` `/`auto_increment`
Extra values for the table.
- ` `(Empty) = None
- `auto_increment` = Primary key will be incremented on new data
***

View File

@ -1,86 +0,0 @@
---
sidebar_position: 2
---
# ConstraintOptions
`Object`
An object used to define additional constraints for a column within a [Structure](../classes/structure).
:::info
All keys within this object are __optional__.
You only need to define the keys for the settings you want to enable.
Default values are always `false` on __Booleans__ or `""` on __Strings__
:::
## Example structure
```js
{
"primary": true,
"index": true,
"null": true,
"unique": true,
"default": "Some default text",
"auto_increment": false,
"unsigned": true
}
```
## Properties
### .primary
&rarr; __Boolean__
Whether this column should be the primary one.
***
### .index
&rarr; __Boolean__
Whether this column should be indexable (Faster query, slower insertion)
***
### .null
&rarr; __Boolean__
Whether this column is null per default
***
### .unique
&rarr; __Boolean__
Whether this column data should be unique and block duplicate data.
***
### .default
&rarr; __String__
Sets the default data for this column that gets inserted if no data was given on insertion.
***
### .auto_increment
&rarr; __Boolean__
Whether this column should be numerical incremented on new insertions.
***
### .unsigned
&rarr; __Boolean__
:::danger Warning
This option is only valid on numerical columns.
:::
Whether this column should be unsigned.
***

View File

@ -1,72 +0,0 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'awSQL Documentation',
tagline: 'Documentation for awesome Sequel',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/awSQL',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/'
},
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
navbar: {
title: 'awSQL Documentation',
logo: {
alt: 'awSQL Logo',
src: 'img/logo512_transparent.png',
},
items: [],
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} awSQL by Sam`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};
export default config;

File diff suppressed because it is too large Load Diff

View File

@ -1,44 +0,0 @@
{
"name": "docusaurus",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.7.0",
"@docusaurus/preset-classic": "3.7.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.7.0",
"@docusaurus/types": "3.7.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}

View File

@ -1,35 +0,0 @@
// @ts-check
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
@type {import('@docusaurus/plugin-content-docs').SidebarsConfig}
*/
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};
export default sidebars;

View File

@ -1,64 +0,0 @@
import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
const FeatureList = [
{
title: 'Easy to Use',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
),
},
{
title: 'Focus on What Matters',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
),
},
{
title: 'Powered by React',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
];
function Feature({Svg, title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}

View File

@ -1,11 +0,0 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}
.featureSvg {
height: 200px;
width: 200px;
}

View File

@ -1,30 +0,0 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB