1.1.0 • Published 2 years ago

@enzymii/minisql-client v1.1.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
2 years ago

MiniSQL-Client

Cache region's address, send read-only request to region server and write statements to master server.

Warning

It is used for course assignment only, you may not use it in production environment~

As there is file operation, it may not use in a browser environment.

When you run it in Node.js, please make sure to set --experimental-specifier-resolution=node flag to ensure proper module resolution.

Usage

Note that all functions implemented in the package are asynchronous~

To create an instance of the client:

const client = await MiniSQLClient.create('xxx');

Where xxx is the master server's address.

To send commands, use

await client.queryRegion([tableName], [sql]);

or

await client.queryMaster([tableName], [sql]);

Note that the first one is for read-only queries, the second one is for write queries.

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago