]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 18 Dec 2008 03:07:42 +0000 (21:07 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 18 Dec 2008 03:07:42 +0000 (21:07 -0600)
Conflicts:
basis/db/types/types.factor

1  2 
basis/db/sqlite/lib/lib.factor

index d19af808a090a83227219f5d0fc87b3a0a1bb51f,fd0d1131d7473586668bff421f23647bedd018a8..b1bc9aa1a218933a4b93e79db6128d29c5e630df
@@@ -5,8 -5,7 +5,8 @@@ namespaces sequences db.sqlite.ffi db c
  continuations db.types calendar.format serialize
  io.streams.byte-array byte-arrays io.encodings.binary
  io.backend db.errors present urls io.encodings.utf8
 -io.encodings.string accessors shuffle ;
 +io.encodings.string accessors shuffle io prettyprint
 +db.private ;
  IN: db.sqlite.lib
  
  ERROR: sqlite-error < db-error n string ;
@@@ -17,7 -16,7 +17,7 @@@ ERROR: sqlite-sql-error < sql-error n s
  
  : sqlite-statement-error ( -- * )
      SQLITE_ERROR
 -    db get handle>> sqlite3_errmsg sqlite-sql-error ;
 +    db-connection get handle>> sqlite3_errmsg sqlite-sql-error ;
  
  : sqlite-check-result ( n -- )
      {
@@@ -43,7 -42,7 +43,7 @@@
      sqlite3_bind_parameter_index ;
  
  : parameter-index ( handle name text -- handle name text )
-     >r dupd sqlite-bind-parameter-index r> ;
+     [ dupd sqlite-bind-parameter-index ] dip ;
  
  : sqlite-bind-text ( handle index text -- )
      utf8 encode dup length SQLITE_TRANSIENT
      ] if* (sqlite-bind-type) ;
  
  : sqlite-finalize ( handle -- ) sqlite3_finalize sqlite-check-result ;
 -: sqlite-reset ( handle -- ) sqlite3_reset sqlite-check-result ;
 +: sqlite-reset ( handle -- )
 +"resetting: " write dup . sqlite3_reset sqlite-check-result ;
  : sqlite-clear-bindings ( handle -- )
      sqlite3_clear_bindings sqlite-check-result ;
  : sqlite-#columns ( query -- int ) sqlite3_column_count ;