@@ -257,7 +257,7 @@ class Database
257
257
@example Insert values in a table
258
258
db.run("INSERT INTO test VALUES (:age, :name)", {':age':18, ':name':'John'});
259
259
260
- @return [Database] The database object (usefull for method chaining)
260
+ @return [Database] The database object (useful for method chaining)
261
261
###
262
262
' run ' : (sql , params ) ->
263
263
if not @db then throw " Database closed"
@@ -353,7 +353,7 @@ class Database
353
353
@param callback [Function(Object)] A function that will be called on each row of result
354
354
@param done [Function] A function that will be called when all rows have been retrieved
355
355
356
- @return [Database] The database object. Usefull for method chaining
356
+ @return [Database] The database object. Useful for method chaining
357
357
358
358
@example Read values from a table
359
359
db.each("SELECT name,age FROM users WHERE age >= $majority",
@@ -431,16 +431,16 @@ class Database
431
431
most recently completed INSERT, UPDATE or DELETE statement on the
432
432
database Executing any other type of SQL statement does not modify
433
433
the value returned by this function.
434
-
434
+
435
435
@return [Number] the number of rows modified
436
436
###
437
437
' getRowsModified ' : -> sqlite3_changes (@db )
438
-
438
+
439
439
### Register a custom function with SQLite
440
440
@example Register a simple function
441
441
db.create_function("addOne", function(x) {return x+1;})
442
442
db.exec("SELECT addOne(1)") // = 2
443
-
443
+
444
444
@param name [String] the name of the function as referenced in SQL statements.
445
445
@param func [Function] the actual function to be executed.
446
446
###
0 commit comments