~ubuntu-branches/ubuntu/oneiric/haxe/oneiric

« back to all changes in this revision

Viewing changes to haxe/std/neko/db/Sqlite.hx

  • Committer: Bazaar Package Importer
  • Author(s): Jens Peter Secher
  • Date: 2010-01-31 23:08:43 UTC
  • mfrom: (5.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100131230843-1cxte2x20ypk9c25
Tags: 1:2.5-1
New upstream version, taken from new upstream subversion repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
                return "'"+s.split("'").join("''")+"'";
57
57
        }
58
58
 
 
59
        public function addValue( s : StringBuf, v : Dynamic ) {
 
60
                var t = untyped __dollar__typeof(v);
 
61
                if( untyped (t == __dollar__tint || t == __dollar__tnull) )
 
62
                        s.add(v);
 
63
                else if( untyped t == __dollar__tbool )
 
64
                        s.add(if( v ) 1 else 0);
 
65
                else
 
66
                        s.add(quote(Std.string(v)));
 
67
        }
 
68
 
59
69
        public function lastInsertId() {
60
70
                return _last_id(c);
61
71
        }