Changeset 20050
- Timestamp:
- 09/27/08 23:25:40 (5 years ago)
- Location:
- lang/cplusplus/llv8call/trunk
- Files:
-
- 2 modified
-
ext/mysql/mysql.cc (modified) (2 diffs)
-
t/020_ext/05_mysql.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/llv8call/trunk/ext/mysql/mysql.cc
r20049 r20050 52 52 mysql_close(conn); 53 53 return Undefined(); 54 } 55 56 static v8::Handle<v8::Value> _ping(const v8::Arguments& args) { 57 HandleScope h; 58 MYSQL* conn = handle<MYSQL>(args, 0); 59 if (mysql_ping(conn) == 0) { 60 return True(); 61 } else { 62 return False(); 63 } 54 64 } 55 65 … … 109 119 Handle<ObjectTemplate> ot = ft->InstanceTemplate(); 110 120 ot->Set(String::New("Close"), FunctionTemplate::New(_close)); 121 ot->Set(String::New("Ping"), FunctionTemplate::New(_ping)); 111 122 ot->Set(String::New("Stat"), FunctionTemplate::New(_stat)); 112 123 ot->Set(String::New("GetServerVersion"), FunctionTemplate::New(_get_server_version)); -
lang/cplusplus/llv8call/trunk/t/020_ext/05_mysql.js
r20032 r20050 12 12 Test.More.ok(db.GetHostInfo(), db.GetHostInfo()); 13 13 Test.More.ok(db.Stat(), db.Stat()); 14 Test.More.ok(db.Ping(), 'ping'); 14 15 db.Close(); 15 16
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)