xlang v5.1 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
AdoConnector类 参考
类 AdoConnector 继承关系图:
Inheritance graph
AdoConnector 的协作图:
Collaboration graph

结构体

class  AdoPreparedStatement
 
class  AdoResultSet
 
class  AdoStatement
 
class  Helper
 
enum  MysqlOption
 

Public 成员函数

包函数

包属性

额外继承的成员函数

详细描述

在文件 AdoConnector.xcsm4 行定义.

构造及析构函数说明

◆ AdoConnector()

在文件 AdoConnector.xcsm18 行定义.

18 {
19 if (_system_.getPlatformId() != 0){
20 throw new IllegalArgumentException("ADO not support this Operating System!");
21 }
22 }
static final int getPlatformId()

引用了 _system_.getPlatformId().

函数调用图:

成员函数说明

◆ close()

void close ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm319 行定义.

319 {
320 //TODO:
321 if (hAdo != 0){
322 Helper.ado_delloc(hAdo);
323 hAdo = 0;
324 }
325 }

引用了 hAdo.

被这些函数引用 finalize().

这是这个函数的调用关系图:

◆ create()

void create ( String  uri,
String  username,
String  pwd 
)
override

实现了 Connection.

在文件 AdoConnector.xcsm337 行定义.

337 {
338
339 if (driver == nilptr){
340 throw new Sql.SqlException(-1, "driver is nilptr");
341 }
342 int errcode = 0;
343 String errmsg = "OK";
344
345 hAdo = Helper.ado_alloc(driver, uri, port, username, pwd, timeout, errcode, errmsg);
346
347 if (0l == hAdo){
348 throw new Sql.SqlException(errcode, errmsg);
349 }
350 }
Definition String.x:5
Definition xsql.xcs:3

引用了 driver, hAdo, port , 以及 timeout.

◆ createStatement()

Sql.Statement createStatement ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm398 行定义.

398 {
399 return new AdoStatement(this);
400 }

◆ finalize()

void finalize ( )
package

在文件 AdoConnector.xcsm327 行定义.

327 {
328 close();
329 }
void close() override

引用了 close().

函数调用图:

◆ getError()

String getError ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm363 行定义.

363 {
364 throw new Sql.DatabaseNotSupportException("getError");
365 return nilptr;
366 }

◆ getErrorCode()

int getErrorCode ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm358 行定义.

358 {
359 //throw new Sql.DatabaseNotSupportException("getErrorCode");
360 return 0;
361 }

◆ getInfo()

String getInfo ( )

在文件 AdoConnector.xcsm373 行定义.

373 {
374 throw new Sql.DatabaseNotSupportException("getInfo");
375 return nilptr;
376 }

◆ getOption()

Object getOption ( int  opt)
override

实现了 Connection.

在文件 AdoConnector.xcsm378 行定义.

378 {
379 //TODO:
380 throw new Sql.DatabaseNotSupportException("getOption");
381 return nilptr;
382 }

◆ getSqlState()

String getSqlState ( )

在文件 AdoConnector.xcsm368 行定义.

368 {
369 throw new Sql.DatabaseNotSupportException("getSqlState");
370 return nilptr;
371 }

◆ isClosed()

bool isClosed ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm352 行定义.

352 {
353 //TODO:
354 return hAdo != 0;
355 }

引用了 hAdo.

◆ prepareStatement()

Sql.PreparedStatement prepareStatement ( String  sql)
override

实现了 Connection.

在文件 AdoConnector.xcsm402 行定义.

402 {
403 return new AdoPreparedStatement(this, sql);
404 }

◆ setDriver()

void setDriver ( String  strDrv)

在文件 AdoConnector.xcsm333 行定义.

333 {
334 driver = strDrv;
335 }

引用了 driver.

被这些函数引用 SqlServer.SqlServer().

这是这个函数的调用关系图:

◆ setOption()

void setOption ( int  opt,
Object  option 
)
override

实现了 Connection.

在文件 AdoConnector.xcsm384 行定义.

384 {
385 switch(opt){
386 case MysqlOption.PORT:
387 port = (int)option;
388 break;
389 case MysqlOption.TIMEOUT:
390 timeout = (int)option;
391 break;
392 default:
393 throw new Sql.DatabaseNotSupportException("getOption");
394 break;
395 }
396 }

引用了 port , 以及 timeout.

结构体成员变量说明

◆ driver

String driver
package

在文件 AdoConnector.xcsm331 行定义.

被这些函数引用 create() , 以及 setDriver().

◆ hAdo

◆ port

int port = 1433
package

在文件 AdoConnector.xcsm8 行定义.

被这些函数引用 create() , 以及 setOption().

◆ timeout

int timeout = 0
package

在文件 AdoConnector.xcsm9 行定义.

被这些函数引用 create() , 以及 setOption().