Skip to content

Commit

Permalink
Generated documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
QSmally committed Sep 14, 2020
1 parent 1596508 commit dde2f12
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 2 deletions.
66 changes: 65 additions & 1 deletion Documentation/Output.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,71 @@
"Returns": "{Selection}"
}
],
"Pool": [],
"Pool": [
{
"Value": "Path",
"Flags": [
"Variable",
"ReadOnly"
],
"Line": 17,
"Description": "Path string to the Pool directory.",
"Type": "{Pathlike}"
},
{
"Value": "Databases",
"Flags": [
"Variable",
"ReadOnly"
],
"Line": 28,
"Description": "A collection of databases this Pool holds.",
"Type": "{DataStore}",
"Reference": "https://github.com/QSmally/Qulity/blob/master/Documentation/DataStore.md"
},
{
"Value": "ValOptions",
"Flags": [
"Variable",
"ReadOnly"
],
"Line": 40,
"Description": "Options for this Pool.",
"Type": "{PoolOptions}"
},
{
"Value": "$",
"Flags": [],
"Line": 71,
"Description": "Retrieves a database Connection (or a ThreadProvider if this Pool is multithreaded).",
"Params": [
"{String} Base Reference link to the Connection to resolve."
],
"Returns": "{Connection|ThreadProvider}"
},
{
"Value": "",
"Flags": [
"Typedef"
],
"Line": 87,
"Description": "Options for a database Pool. All integer related options are in milliseconds. ",
"Typedef": "{Object} PoolOptions",
"Params": [
"{Object<Filename, RawOptions>} Exclusives Non-default options to use for certain Connections to a database.",
"{Boolean|Number} Threads Whether to create a thread for each Connection, or an integer to indicate the amount of threads. ",
"{String} Table A default table name for each Connection in this Pool.",
"{Boolean} WAL Default setting to enable Write Ahead Logging mode for Connections in this Pool.",
"{Boolean} Cache Whether to enable in-memory caching of entries in results that the next retrieval would be much faster.",
"{Boolean} UtilCache Whether or not to cache entries while performing utility tasks, such as the Exists and Accumulate methods.",
"{Number} SweepInterval Integer to indicate at what interval to sweep the entries of the Connection's internal cache.",
"{Number} SweepLifetime The minimum age of an entry in the cache to consider being sweepable after an interval. ",
"{Number} SnapshotLifetime After how many intervals to merge the latest snapshot backups into one.",
"{Number} BackupInterval Integer to indicate at what interval to create a snapshot backup, or merge the snapshots.",
"{Pathlike} BackupDirectory A path URL to the directory to insert all the database backups in."
]
}
],
"PartialConnection": [
{
"Value": "State",
Expand Down
46 changes: 45 additions & 1 deletion Documentation/Pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,50 @@ const MyDBs = new QDB.Pool("lib/Databases/");
| Key | Type | Description |
| --- | --- | --- |
| PathURL | Pathlike | Path to the database file or directory. |
| RawOptions | RawOptions | Options to pass onto every database Connection. |
| PoolOptions? | PoolOptions | Options for this Pool to manage, including separate Connection options. |



# Values
## [.Path](https://github.com/QSmally/QDB/blob/v4/lib/Connections/Pool.js#L17)
> Path string to the Pool directory. [**Read Only**]
>
> Type **{Pathlike}**
## [.Databases](https://github.com/QSmally/QDB/blob/v4/lib/Connections/Pool.js#L28)
> A collection of databases this Pool holds. [**Read Only**]
>
> Type **[{DataStore}](https://github.com/QSmally/Qulity/blob/master/Documentation/DataStore.md)**
## [.ValOptions](https://github.com/QSmally/QDB/blob/v4/lib/Connections/Pool.js#L40)
> Options for this Pool. [**Read Only**]
>
> Type **{PoolOptions}**
# Methods
## [.$(Base)](https://github.com/QSmally/QDB/blob/v4/lib/Connections/Pool.js#L71)
> Retrieves a database Connection (or a ThreadProvider if this Pool is multithreaded).
> | Key | Type | Description |
> | --- | --- | --- |
> | Base | String | Reference link to the Connection to resolve. |
>
> Returns **{Connection|ThreadProvider}**
# Typedefs
## [.PoolOptions](https://github.com/QSmally/QDB/blob/v4/lib/Connections/Pool.js#L87)
> Options for a database Pool. All integer related options are in milliseconds.
> | Key | Type | Description |
> | --- | --- | --- |
> | RawOptions>} | Object<Filename, | Exclusives Non-default options to use for certain Connections to a database. |
> | Threads | Boolean, Number | Whether to create a thread for each Connection, or an integer to indicate the amount of threads. |
> | Table | String | A default table name for each Connection in this Pool. |
> | WAL | Boolean | Default setting to enable Write Ahead Logging mode for Connections in this Pool. |
> | Cache | Boolean | Whether to enable in-memory caching of entries in results that the next retrieval would be much faster. |
> | UtilCache | Boolean | Whether or not to cache entries while performing utility tasks, such as the Exists and Accumulate methods. |
> | SweepInterval | Number | Integer to indicate at what interval to sweep the entries of the Connection's internal cache. |
> | SweepLifetime | Number | The minimum age of an entry in the cache to consider being sweepable after an interval. |
> | SnapshotLifetime | Number | After how many intervals to merge the latest snapshot backups into one. |
> | BackupInterval | Number | Integer to indicate at what interval to create a snapshot backup, or merge the snapshots. |
> | BackupDirectory | Pathlike | A path URL to the directory to insert all the database backups in. |
>
> Type **{Object}**

0 comments on commit dde2f12

Please sign in to comment.