flow: fix `Statement` properties (#886)

Summary:
These were completely wrong; my bad.

[The docs][1] list `source` and `returnsData` but not `database`.
I include the latter only for consistency with `Transaction`, and will
consider removing them both as they are technically undocumented (though
not underscore-named, so it’s not clear-cut).

[1]: https://wchargin.github.io/better-sqlite3/api.html#properties-1

Test Plan:
At a Node console:

```js
> require("better-sqlite3")(":memory:").prepare("BEGIN")
Statement {
  returnsData: false,
  source: 'BEGIN',
  database:
   Database {
     inTransaction: false,
     open: true,
     memory: false,
     readonly: false,
     name: ':memory:' } }
```

wchargin-branch: flow-better-sqlite3-statement-properties
This commit is contained in:
William Chargin 2018-09-21 17:48:28 -07:00 committed by GitHub
parent 3b962eacea
commit 252400d5e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -61,11 +61,9 @@ declare type bettersqlite3$BoundParameter =
| bettersqlite3$BindingDictionary;
declare class bettersqlite3$Statement {
+memory: boolean;
+readonly: boolean;
+name: string;
+open: boolean;
+inTransaction: boolean;
+database: bettersqlite3$Database;
+source: string;
+returnsData: boolean;
run(...params: bettersqlite3$BoundParameter[]): bettersqlite3$RunResult;
get(...params: bettersqlite3$BoundParameter[]): any;