https://github.com/linux-china/kmydocument
Kotlin for MySQL Document Store
https://github.com/linux-china/kmydocument
kotlin mysql mysql8
Last synced: 3 months ago
JSON representation
Kotlin for MySQL Document Store
- Host: GitHub
- URL: https://github.com/linux-china/kmydocument
- Owner: linux-china
- Created: 2018-06-13T03:42:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-13T07:02:50.000Z (over 7 years ago)
- Last Synced: 2025-07-15T02:51:13.353Z (6 months ago)
- Topics: kotlin, mysql, mysql8
- Language: Kotlin
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Kotlin for MySQL document store
===============================
# Setup
Please use "docker-compose up -d" to start MySQL 8.
# Ports
* 3306: traditional
* 33060: X Protocol
# Document Store
* Schema: database name
* Collection: almost like table
* DbDoc: document
* id: name should be "_id" with String type
* jdbc url: mysqlx://127.0.0.1:33060/demo?user=root&password=password
# MySQL Shell
Login
```bash
mysqlsh --uri root@127.0.0.1
```
Operations in MySQL Shell
```
JS> \use demo
JS> db.createCollection("Account")
JS> db.get_collections()
JS> db.get_collections()
JS> db.Account.find()
```
* query: https://dev.mysql.com/doc/refman/8.0/en/mysql-shell-tutorial-javascript-documents-find.html
# Reference
* MySQL Shell: https://dev.mysql.com/doc/refman/5.7/en/mysql-shell.html
* Connector/J 8.0: https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-whats-new.html
* Enable X Protocol: https://dev.mysql.com/doc/refman/5.7/en/document-store-setting-up.html
```
mysqlsh -u root -h 127.0.0.1 --classic --dba enableXProtocol
```