Skip to content

Commit c6aa888

Browse files
author
kai.zhu
committed
- fix english-grammar error "an sql" to "a sql"
1 parent 6e5024e commit c6aa888

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const SQL = await initSqlJs({
3535
// Create a database
3636
var db = new SQL.Database();
3737
// NOTE: You can also use new SQL.Database(data) where
38-
// data is an Uint8Array representing an SQLite database file
38+
// data is an Uint8Array representing a SQLite database file
3939

4040
// Execute some sql
4141
sqlstr = "CREATE TABLE hello (a int, b char);";
@@ -50,7 +50,7 @@ var res = db.exec("SELECT * FROM hello");
5050
]
5151
*/
5252

53-
// Prepare an sql statement
53+
// Prepare a sql statement
5454
var stmt = db.prepare("SELECT * FROM hello WHERE a=:aval AND b=:bval");
5555

5656
// Bind values to the parameters and fetch the results of the query
@@ -214,7 +214,7 @@ Example:
214214
worker.postMessage({
215215
id:1,
216216
action:"open",
217-
buffer:buf, /*Optional. An ArrayBuffer representing an SQLite Database file*/
217+
buffer:buf, /*Optional. An ArrayBuffer representing a SQLite Database file*/
218218
});
219219
</script>
220220
```

examples/GUI/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h1>Online SQL interpreter</h1>
4949

5050
<button id="execute" class="button">Execute</button>
5151
<button id='savedb' class="button">Save the db</button>
52-
<label class="button">Load an SQLite database file: <input type='file' id='dbfile'></label>
52+
<label class="button">Load a SQLite database file: <input type='file' id='dbfile'></label>
5353

5454
<div id="error" class="error"></div>
5555

src/api.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -586,13 +586,13 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
586586

587587

588588
/** @classdesc
589-
* Represents an SQLite database
589+
* Represents a SQLite database
590590
* @constructs Database
591591
* @memberof module:SqlJs
592592
* Open a new database either by creating a new one or opening an existing one,
593593
* stored in the byte array passed in first argument
594594
* @param {number[]} data An array of bytes representing
595-
* an SQLite database file
595+
* a SQLite database file
596596
*/
597597
function Database(data) {
598598
this.filename = "dbfile_" + (0xffffffff * Math.random() >>> 0);
@@ -609,11 +609,11 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
609609
this.functions = {};
610610
}
611611

612-
/** Execute an SQL query, ignoring the rows it returns.
612+
/** Execute a SQL query, ignoring the rows it returns.
613613
@param {string} sql a string containing some SQL text to execute
614614
@param {any[]} [params=[]] When the SQL statement contains placeholders,
615615
you can pass them in here. They will be bound to the statement
616-
before it is executed. If you use the params argument, you **cannot** provide an sql string
616+
before it is executed. If you use the params argument, you **cannot** provide a sql string
617617
that contains several queries (separated by `;`)
618618
619619
@example
@@ -647,7 +647,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
647647
* @property {Database.SqlValue[][]} values one array per row, containing the column values
648648
*/
649649

650-
/** Execute an SQL query, and returns the result.
650+
/** Execute a SQL query, and returns the result.
651651
*
652652
* This is a wrapper against
653653
* {@link Database.prepare},
@@ -698,7 +698,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
698698
@param {any[]} [params=[]] When the SQL statement contains placeholders,
699699
you can pass them in here. They will be bound to the statement
700700
before it is executed. If you use the params argument as an array,
701-
you **cannot** provide an sql string that contains several queries
701+
you **cannot** provide a sql string that contains several queries
702702
(separated by `;`). This limitation does not apply to params as an object.
703703
* @return {Database.QueryExecResult[]} The results of each statement
704704
*/
@@ -757,7 +757,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
757757
}
758758
};
759759

760-
/** Execute an sql statement, and call a callback for each row of result.
760+
/** Execute a sql statement, and call a callback for each row of result.
761761
762762
**Currently** this method is synchronous, it will not return until the callback
763763
has been called on every row of the result. But this might change.
@@ -796,7 +796,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
796796
return undefined;
797797
};
798798

799-
/** Prepare an SQL statement
799+
/** Prepare a SQL statement
800800
@param {string} sql a string of SQL, that can contain placeholders
801801
(`?`, `:VVV`, `:AAA`, `@AAA`)
802802
@param {Statement.BindParams} [params] values to bind to placeholders

test/test_database.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exports.test = function(SQL, assert, done) {
2727
// Export the database to an Uint8Array containing the SQLite database file
2828
var binaryArray = db.export();
2929
assert.strictEqual(String.fromCharCode.apply(null,binaryArray.subarray(0,6)), 'SQLite',
30-
"The first 6 bytes of an SQLite database should form the word 'SQLite'");
30+
"The first 6 bytes of a SQLite database should form the word 'SQLite'");
3131
db.close();
3232

3333
var db2 = new SQL.Database(binaryArray);

test/test_node_file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports.test = function(SQL, assert) {
1414
var res = db.exec("SELECT * FROM test WHERE id = 0");
1515
assert.deepEqual(res,
1616
[{"columns":["id","content"],"values":[[0,"hello"]]}],
17-
"One should be able to read the contents of an SQLite database file read from disk");
17+
"One should be able to read the contents of a SQLite database file read from disk");
1818
db.close();
1919
}
2020

test/test_statement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ exports.test = function(sql, assert){
4141
stmt = db.prepare("SELECT str FROM data WHERE str=?");
4242
assert.deepEqual(stmt.getAsObject(['粵語😄']), {'str':'粵語😄'}, "UTF8 support in prepared statements");
4343

44-
// Prepare an sql statement
44+
// Prepare a sql statement
4545
stmt = db.prepare("SELECT * FROM alphabet WHERE code BETWEEN :start AND :end ORDER BY code");
4646
// Bind values to the parameters
4747
stmt.bind([0, 256]);

test/test_worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ exports.test = async function test(SQL, assert) {
9090
var header = "SQLite format 3\0";
9191
var actual = "";
9292
for (let i = 0; i < header.length; i++) actual += String.fromCharCode(data.buffer[i]);
93-
assert.equal(actual, header, 'Data returned is an SQLite database file');
93+
assert.equal(actual, header, 'Data returned is a SQLite database file');
9494
}
9595

9696
function obj2array(obj) {

0 commit comments

Comments
 (0)