Skip to content

Commit 0d6c641

Browse files
committed
It's technically a rowid, not a row id
Signed-off-by: Stephen Celis <[email protected]>
1 parent 3df3ed7 commit 0d6c641

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

SQLite/Database.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public final class Database {
5353

5454
// MARK: -
5555

56-
/// The last row id inserted into the database via this connection.
56+
/// The last rowid inserted into the database via this connection.
5757
public var lastId: Int64? {
5858
let lastId = sqlite3_last_insert_rowid(handle)
5959
return lastId == 0 ? nil : lastId

SQLite/Query.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -438,14 +438,14 @@ public struct Query {
438438
///
439439
/// :param: values A list of values to set.
440440
///
441-
/// :returns: The row id.
441+
/// :returns: The rowid.
442442
public func insert(value: Setter, _ more: Setter...) -> Int64? { return insert([value] + more).id }
443443

444444
/// Runs an INSERT statement against the query.
445445
///
446446
/// :param: values A list of values to set.
447447
///
448-
/// :returns: The row id and statement.
448+
/// :returns: The rowid and statement.
449449
public func insert(value: Setter, _ more: Setter...) -> (id: Int64?, statement: Statement) {
450450
return insert([value] + more)
451451
}
@@ -454,14 +454,14 @@ public struct Query {
454454
///
455455
/// :param: values An array of values to set.
456456
///
457-
/// :returns: The row id.
457+
/// :returns: The rowid.
458458
public func insert(values: [Setter]) -> Int64? { return insert(values).id }
459459

460460
/// Runs an INSERT statement against the query.
461461
///
462462
/// :param: values An array of values to set.
463463
///
464-
/// :returns: The row id and statement.
464+
/// :returns: The rowid and statement.
465465
public func insert(values: [Setter]) -> (id: Int64?, statement: Statement) {
466466
let statement = insertStatement(values).run()
467467
return (statement.failed ? nil : database.lastId, statement)
@@ -497,14 +497,14 @@ public struct Query {
497497
///
498498
/// :param: values A list of values to set.
499499
///
500-
/// :returns: The row id.
500+
/// :returns: The rowid.
501501
public func replace(values: Setter...) -> Int64? { return replace(values).id }
502502

503503
/// Runs a REPLACE statement against the query.
504504
///
505505
/// :param: values A list of values to set.
506506
///
507-
/// :returns: The row id and statement.
507+
/// :returns: The rowid and statement.
508508
public func replace(values: Setter...) -> (id: Int64?, statement: Statement) {
509509
return replace(values)
510510
}
@@ -513,14 +513,14 @@ public struct Query {
513513
///
514514
/// :param: values An array of values to set.
515515
///
516-
/// :returns: The row id.
516+
/// :returns: The rowid.
517517
public func replace(values: [Setter]) -> Int64? { return replace(values).id }
518518

519519
/// Runs a REPLACE statement against the query.
520520
///
521521
/// :param: values An array of values to set.
522522
///
523-
/// :returns: The row id and statement.
523+
/// :returns: The rowid and statement.
524524
public func replace(values: [Setter]) -> (id: Int64?, statement: Statement) {
525525
let statement = insertStatement(values, or: .Replace).run()
526526
return (statement.failed ? nil : database.lastId, statement)

0 commit comments

Comments
 (0)