-
Notifications
You must be signed in to change notification settings - Fork 22
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: Add drizzle sample for javascript #76
Conversation
If the component can be executed by command line, please add a run.sh script for it to test it on GitHub Action. Otherwise please add the module to applications directory. |
a71b2ec
to
ec5281c
Compare
@whhe Done. |
a67b7a2
to
08c124d
Compare
69beb9d
to
95d03da
Compare
22d0b1a
to
86e9ed8
Compare
@@ -17,8 +17,12 @@ jobs: | |||
module: | |||
- name: 'mysql2' | |||
with_oceanbase_container: true | |||
- name: 'drizzle' | |||
with_oceanbase_container: true | |||
oceanbase_image_tag: '4.2.3_BETA' |
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 oceanbase-ce >= 4.2.3
supports serial
data type and that is required for Drizzle.
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.
Great work!
Connect to OceanBase with Drizzle
This document describes how to connect to OceanBase with Drizzle.
Preparation
Make sure
Node.js
andnpm
are installed.Usage
Clone the project and navigate to the appropriate directory:
Install dependencies:
Modify the connection string in the
.env
file:DATABASE_URL="mysql://root:@127.0.0.1:2881/test"
Synchronize the
users
model defined indb/schema.ts
to the database:Execute
index.ts
:The output should be as follows, indicating successful execution:
Check the corresponding
users
table and the data has been inserted: