Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ephys authored Apr 11, 2024
2 parents 543453e + b47b4cb commit a122b28
Show file tree
Hide file tree
Showing 52 changed files with 1,427 additions and 682 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @sequelize/code-reviewers
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: sequelize
patreon: # Replace with a single Patreon username
open_collective: sequelize
ko_fi: # Replace with a single Ko-fi username
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: auto-update PRs & label conflicts
on:
push:
branches:
- main
# can also be used with the pull_request event
pull_request_target:
types:
- synchronize
# allow the workflow to correct any label incorrectly added or removed by a user.
- labeled
- unlabeled
# update the PR as soon as the auto-merge is enabled.
- auto_merge_enabled
# process the PR once they appear in the search filters
- ready_for_review
- opened
- reopened
jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- name: Generate Sequelize Bot Token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: '${{ secrets.SEQUELIZE_BOT_APP_ID }}'
private-key: '${{ secrets.SEQUELIZE_BOT_PRIVATE_KEY }}'
- uses: sequelize/pr-auto-update-and-handle-conflicts@257ac5f68859672393e3320495164251140bd801 # 1.0.1
with:
conflict-label: 'conflicted'
conflict-requires-ready-state: 'ready_for_review'
conflict-excluded-authors: 'bot/renovate'
update-pr-branches: true
update-requires-auto-merge: true
update-requires-ready-state: 'ready_for_review'
update-excluded-authors: 'bot/renovate'
update-excluded-labels: 'no-autoupdate'
env:
GITHUB_TOKEN: '${{ steps.generate-token.outputs.token }}'
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"singleQuote": true
"singleQuote": true
}
2 changes: 1 addition & 1 deletion docs/associations/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"position": 5,
"position": 6,
"label": "Associations",
"collapsible": true,
"collapsed": false,
Expand Down
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Sequelize CLI
sidebar_position: 8
sidebar_position: 9
---

:::warning
Expand Down
9 changes: 9 additions & 0 deletions docs/databases/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"position": 3,
"label": "Databases",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index"
}
}
5 changes: 5 additions & 0 deletions docs/databases/_connection-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Connection Options are used to configure a connection to the database.

The simplest way to use them is at the root of the configuration object. These options can also be
used in the [`replication`](../other-topics/read-replication.md) option to customize the connection for each replica,
and can be modified by the [`beforeConnect`](../other-topics/hooks.mdx) hook on a connection-by-connection basis.
54 changes: 54 additions & 0 deletions docs/databases/db2.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: DB2 for LUW
sidebar_position: 1
---

# Sequelize for DB2 for Linux, Unix, and Windows

:::info Version Compatibility

See [Releases](/releases#db2-for-luw-support-table) to see which versions of DB2 for LUW are supported.

:::

To use Sequelize with DB2 for LUW, you need to install the `@sequelize/db2` dialect package:

```bash npm2yarn
npm i @sequelize/db2
```

Then use the `Db2Dialect` class as the dialect option in the Sequelize constructor:

```ts
import { Sequelize } from '@sequelize/core';
import { Db2Dialect } from '@sequelize/db2';

const sequelize = new Sequelize({
dialect: Db2Dialect,
database: 'mydb',
user: 'myuser',
password: 'mypass',
hostname: 'localhost',
port: 50000,
ssl: true,
});
```

## Connection Options

import ConnectionOptions from './_connection-options.md';

<ConnectionOptions />

The following options are accepted by the DB2 for LUW dialect:

| Option | Description |
|------------------------|-------------------------------------------------|
| `database` | ODBC "DATABASE" parameter |
| `username` | ODBC "UID" parameter |
| `password` | ODBC "PWD" parameter |
| `hostname` | ODBC "HOSTNAME" parameter |
| `port` | ODBC "PORT" parameter |
| `ssl` | Sets ODBC "Security" parameter to SSL when true |
| `sslServerCertificate` | ODBC "SSLServerCertificate" parameter |
| `odbcOptions` | Additional ODBC parameters. |
58 changes: 58 additions & 0 deletions docs/databases/ibmi.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: DB2 for IBM i
sidebar_position: 1
---

# Sequelize for DB2 for IBM i

:::danger

Our implementation of DB2 for IBM i is not integration tested against an actual database.
As such, we cannot guarantee that it will work as expected, nor its stability.

We rely on the community to help us improve this dialect.

:::

:::info Version Compatibility

See [Releases](/releases#db2-for-ibm-i-support-table) to see which versions of DB2 for IBM i are supported.

:::

To use Sequelize with DB2 for IBM i, you need to install the `@sequelize/db2-ibmi` dialect package:

```bash npm2yarn
npm i @sequelize/db2-ibmi
```

Then use the `IbmiDialect` class as the dialect option in the Sequelize constructor:

```ts
import { Sequelize } from '@sequelize/core';
import { IbmiDialect } from '@sequelize/db2-ibmi';

const sequelize = new Sequelize({
dialect: IbmiDialect,
odbcConnectionString: 'DSN=MYDSN;UID=myuser;PWD=mypassword',
connectionTimeout: 60,
});
```

## Connection Options

import ConnectionOptions from './_connection-options.md';

<ConnectionOptions />

The following options are accepted by the DB2 for IBM i dialect:

| Option | Description |
|------------------------|---------------------------------------------------------------------------------------------------------------|
| `connectionTimeout` | The number of seconds to wait for a request on the connection to complete before returning to the application |
| `loginTimeout` | The number of seconds to wait for a login request to complete before returning to the application |
| `odbcConnectionString` | The connection string to connect to the database. If provided, the options below are not necessary. |
| `dataSourceName` | The ODBC "DSN" part of the connection string. |
| `username` | The ODBC "UID" part of the connection string. |
| `system` | The ODBC "SYSTEM" part of the connection string. |
| `password` | The ODBC "PWD" part of the connection string. |
Loading

0 comments on commit a122b28

Please sign in to comment.