rx-sql
v1.0.0
Published
RxJS Implementation of MySQL
Downloads
95
Maintainers
Readme
rx-sql
RxJS Implementation of MySQL
import { RxSQL } from "rx-sql";
import { createConnection } from "mysql";
import { flatMap } from "rxjs/operators";
let db = createConnection({
host: "localhost",
database: "database",
user: "root",
password: "password"
});
let rxsql$ = new RxSQL(db);
rxsql$
.query("SELECT * FROM table")
.pipe(flatMap(result => result))
.subscribe(
result => console.log(result),
error => console.error(error)
() => console.info("Completed!")
);