code: update references to `standard`
[nit.git] / lib / sqlite3 / sqlite3.nit
index 05c5a06..40dcdad 100644 (file)
@@ -20,7 +20,7 @@
 module sqlite3
 
 private import native_sqlite3
-import standard
+import core
 
 # A connection to a Sqlite3 database
 class Sqlite3DB
@@ -35,7 +35,7 @@ class Sqlite3DB
        # Open a connection to the database file at `path`
        init open(path: Text)
        do
-               native_connection = new NativeSqlite3.open(path.to_s)
+               init(new NativeSqlite3.open(path.to_s))
                if native_connection.is_valid then is_open = true
        end
 
@@ -132,6 +132,7 @@ class Statement
        end
 end
 
+# A row from a `Statement`
 class StatementRow
        # Statement linked to `self`
        var statement: Statement
@@ -160,7 +161,7 @@ class StatementEntry
        # Name of the column
        #
        # require: `self.statement.is_open`
-       fun name: String is cached do
+       var name: String is lazy do
                assert statement_closed: statement.is_open
 
                return statement.native_statement.column_name(index)
@@ -256,7 +257,7 @@ class StatementIterator
 
        redef var item: StatementRow is noinit
 
-       redef var is_ok: Bool is noinit
+       redef var is_ok is noinit
 
        # require: `self.statement.is_open`
        redef fun next
@@ -298,6 +299,9 @@ end
 class Blob
        super Sqlite3Data
 
+       # Pointer to the beginning of the blob
        var pointer: Pointer
+
+       # Size of the blob
        var length: Int
 end