7.9.0 • Published 6 days ago

cds-mysql v7.9.0

Weekly downloads
174
License
MIT
Repository
github
Last release
6 days ago

cds mysql

npm version node-test database-test

codecov Security Rating Technical Debt Vulnerabilities

MySQL/MariaDB adapter for CAP Framework, this module is heavily inspired by the cds-pg module.

Setup

firstly, install npm packages

npm i cds-mysql mysql2

setup the mysql database driver for cds -> edit the package.json > cds node (or .cdsrc.json)

{
  "requires": {
    "db": {
      "kind": "mysql"
    }
  }
}

create an .env file and put that into your local CDS project, then fill the database credential

CDS_REQUIRES_DB_CREDENTIALS_HOST=127.0.0.1
CDS_REQUIRES_DB_CREDENTIALS_PORT=3306
CDS_REQUIRES_DB_CREDENTIALS_DATABASE= # db name
CDS_REQUIRES_DB_CREDENTIALS_USER= # db user
CDS_REQUIRES_DB_CREDENTIALS_PASSWORD= # db user pwd!

now, start the cds server (npx cds-serve), everything is ready!

!TIP read more about how to config database credential.

!TIP read more about how to setup database user.


in addition, please check cap-mysql-sflight to get the mysql version of official cap-sflight example, and it works well.

Advanced Documentation

please read the full long version Advanced Documentation to get more technical details.

Feature and RoadMap

  • fundamental INSERT/UPDATE/DELETE/SELECT query support
    • support UPSERT by INSERT ... ON DUPLICATE KEY UPDATE statement
  • deep insert for association/composition
    • deep create/update/query/delete test case
  • fiori draft support
    • draftPrepare/draftEdit/draftActivate test case
  • temporal aspect, but not support time-travel query
  • incrementID auto incremental key aspect
  • preDelivery CSV aspect
    • migrate CSV on-demand (with option)
    • CSV migration with hash check
    • care entity dependencies - the order of CSV import
  • full text search
  • schema migration optimization (ignore drop in some case)
    • ignore column length reduce and with warning
    • model version, only incremental migration - transparent migration
  • @Core.Media attachment support
  • localized data
  • multi tenancy
    • deploy model on-fly
    • create database on-demand
      • user permission check
    • experimental @sap/cds-mtxs support -> document - behavior maybe changed later.
      • extensibility (pull/push)
  • $expand navigation
  • $filter with canonical functions (concat/contains/substring)
  • test with mariadb 10, mysql 5/8
  • initial data provision by CSV
    • better migration type/column/name adaption
  • mysql index
    • better error for not supported elements
  • automatically schema sync (when connection pool provision)
  • SELECT FOR UPDATE/LOCK IN SHARE MODE
    • NOWAIT support
    • SKIP LOCKED support
  • better E2E document/sample - cap-mysql-sflight
  • adapt new cds-dbs layer
  • real stream adoption for binary

CHANGELOG

LICENSE

7.9.0

6 days ago

7.8.2

16 days ago

7.8.1

1 month ago

7.7.1

2 months ago

7.7.0

2 months ago

7.6.0

3 months ago

7.5.0

3 months ago

7.4.1

5 months ago

7.3.0

7 months ago

7.1.1

9 months ago

7.1.0

9 months ago

7.4.0

6 months ago

7.2.1

7 months ago

7.2.0

7 months ago

6.8.1

11 months ago

7.0.0

11 months ago

6.8.0

12 months ago

6.7.0

1 year ago

6.5.0

1 year ago

6.6.0-alpha.0

1 year ago

6.5.0-alpha.0

1 year ago

5.9.16

1 year ago

6.4.2

1 year ago

6.4.1

1 year ago

6.4.0

1 year ago

6.3.6-2

1 year ago

6.3.6-3

1 year ago

6.3.6-0

1 year ago

6.3.4-2

1 year ago

6.3.6-1

1 year ago

6.3.4-3

1 year ago

6.4.0-alpha.0

1 year ago

6.3.4

1 year ago

6.3.6

1 year ago

6.3.5

1 year ago

6.3.0

1 year ago

6.3.2

1 year ago

6.3.1

1 year ago

6.3.0-alpha.0

2 years ago

6.3.0-alpha.1

2 years ago

6.2.0-alpha.0

2 years ago

6.2.1

2 years ago

6.2.0

2 years ago

6.2.2

2 years ago

6.3.0-beta.0

2 years ago

6.3.0-beta.1

1 year ago

6.3.0-beta.2

1 year ago

6.2.0-alpha.2

2 years ago

6.2.0-alpha.1

2 years ago

6.3.4-0

1 year ago

6.3.4-1

1 year ago

6.3.3

1 year ago

6.1.0

2 years ago

6.0.0

2 years ago

5.9.11

2 years ago

5.9.12

2 years ago

5.9.13

2 years ago

5.9.14

2 years ago

5.9.15

2 years ago

5.9.10

2 years ago

5.9.10-0

2 years ago

5.9.9

2 years ago

5.9.9-alpha.0

2 years ago

5.9.8

2 years ago

5.9.7

2 years ago

5.9.7-alpha.0

2 years ago

5.9.6

2 years ago

5.9.6-alpha.1

2 years ago

5.9.6-alpha.0

2 years ago

5.9.5

2 years ago

5.9.4

2 years ago

5.9.3

2 years ago

5.9.2

2 years ago

5.9.1

2 years ago

5.9.0

2 years ago

5.4.5

2 years ago

5.8.0

2 years ago

5.4.4

3 years ago

5.4.2

3 years ago

5.4.1

3 years ago

5.4.0

3 years ago

5.3.0

3 years ago

5.4.3

3 years ago

5.2.3

3 years ago

5.2.2

3 years ago

5.2.1

3 years ago

5.1.0

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago