forked from sidorares/node-mysql2
-
Notifications
You must be signed in to change notification settings - Fork 0
Psharma/update readme #8
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5dea449
README.md update
psharma-1909 50836cf
gh_pages
psharma-1909 15c3a36
testing workflow
psharma-1909 e63a071
changed history page
psharma-1909 b4e0db7
fix api page
psharma-1909 8480836
comments
psharma-1909 0014e0e
removed feature branch from gh-pages ci
psharma-1909 6613547
docs update
psharma-1909 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,31 @@ | ||
| # API and Configuration | ||
|
|
||
| [node-mysql]: https://github.com/mysqljs/mysql | ||
| [node-mysql2]: https://github.com/sidorares/node-mysql2 | ||
| [singlestore-docs]: https://docs.singlestore.com/ | ||
|
|
||
| MySQL2 is mostly API compatible with [Node MySQL][node-mysql]. | ||
| SingleStore Node.js Driver is mostly API compatible with [node-mysql2][node-mysql2] and [Node MySQL][node-mysql]. Since SingleStore is MySQL wire-protocol compatible, most existing MySQL client code works seamlessly. | ||
|
|
||
| ## Known Incompatibilities | ||
|
|
||
| One known incompatibility is that `DECIMAL` values are returned as strings whereas in [Node MySQL][node-mysql] they are returned as numbers. This includes the result of `SUM()` and `AVG()` functions when applied to `INTEGER` arguments. This is done deliberately to avoid loss of precision - see https://github.com/sidorares/node-mysql2/issues/935. | ||
|
|
||
| ## Migration from MySQL2 | ||
|
|
||
| SingleStore Node.js Driver is API-compatible with MySQL2, so migration is straightforward: | ||
|
|
||
| ```javascript | ||
| // Before (MySQL2) | ||
| const mysql = require('mysql2'); | ||
| const connection = mysql.createConnection({...}); | ||
|
|
||
| // After (SingleStore Node.js Driver) | ||
| const singlestore = require('singlestore_nodejs'); | ||
| const connection = singlestore.createConnection({...}); | ||
|
|
||
| // All existing queries work as-is! | ||
| ``` | ||
|
|
||
| :::info | ||
| If you find any other incompatibility with [Node MySQL][node-mysql], Please report via Issue tracker. We will fix reported incompatibility on priority basis. | ||
| If you find any incompatibility with [node-mysql2][node-mysql2] or issues specific to SingleStoreDB, please report via GitHub issue. We will address reported issues on priority basis. | ||
| ::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.