xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
结构体 | Public 成员函数 | 包函数 | 包属性
AdoConnector类 参考
类 AdoConnector 继承关系图:
Connection SqlServer

结构体

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 }
系统和IO相关
static final int getPlatformId()

引用了 _system_.getPlatformId().

成员函数说明

◆ close()

void close ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm307 行定义.

307 {
308 //TODO:
309 if (hAdo != 0){
310 Helper.ado_delloc(hAdo);
311 hAdo = 0;
312 }
313 }

引用了 hAdo.

被这些函数引用 finalize().

◆ create()

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

实现了 Connection.

在文件 AdoConnector.xcsm325 行定义.

325 {
326
327 if (driver == nilptr){
328 throw new Sql.SqlException(-1, "driver is nilptr");
329 }
330 int errcode = 0;
331 String errmsg = nilptr;
332
333 hAdo = Helper.ado_alloc(driver, uri, port, username, pwd, timeout, errcode, errmsg);
334
335 if (0l == hAdo){
336 throw new Sql.SqlException(errcode, errmsg);
337 }
338 }
字符串类
Definition xsql.xcs:3

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

◆ createStatement()

Sql.Statement createStatement ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm386 行定义.

386 {
387 return new AdoStatement(this);
388 }

◆ finalize()

void finalize ( )
package

在文件 AdoConnector.xcsm315 行定义.

315 {
316 close();
317 }
void close() override

引用了 close().

◆ getError()

String getError ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm351 行定义.

351 {
352 throw new Sql.DatabaseNotSupportException("getError");
353 return nilptr;
354 }

◆ getErrorCode()

int getErrorCode ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm346 行定义.

346 {
347 //throw new Sql.DatabaseNotSupportException("getErrorCode");
348 return 0;
349 }

◆ getInfo()

String getInfo ( )

在文件 AdoConnector.xcsm361 行定义.

361 {
362 throw new Sql.DatabaseNotSupportException("getInfo");
363 return nilptr;
364 }

◆ getOption()

Object getOption ( int  opt)
override

实现了 Connection.

在文件 AdoConnector.xcsm366 行定义.

366 {
367 //TODO:
368 throw new Sql.DatabaseNotSupportException("getOption");
369 return nilptr;
370 }

◆ getSqlState()

String getSqlState ( )

在文件 AdoConnector.xcsm356 行定义.

356 {
357 throw new Sql.DatabaseNotSupportException("getSqlState");
358 return nilptr;
359 }

◆ isClosed()

bool isClosed ( )
override

实现了 Connection.

在文件 AdoConnector.xcsm340 行定义.

340 {
341 //TODO:
342 return hAdo != 0;
343 }

引用了 hAdo.

◆ prepareStatement()

Sql.PreparedStatement prepareStatement ( String  sql)
override

实现了 Connection.

在文件 AdoConnector.xcsm390 行定义.

390 {
391 return new AdoPreparedStatement(this, sql);
392 }

◆ setDriver()

void setDriver ( String  strDrv)

在文件 AdoConnector.xcsm321 行定义.

321 {
322 driver = strDrv;
323 }

引用了 driver.

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

◆ setOption()

void setOption ( int  opt,
Object  option 
)
override

实现了 Connection.

在文件 AdoConnector.xcsm372 行定义.

372 {
373 switch(opt){
374 case MysqlOption.PORT:
375 port = (int)option;
376 break;
377 case MysqlOption.TIMEOUT:
378 timeout = (int)option;
379 break;
380 default:
381 throw new Sql.DatabaseNotSupportException("getOption");
382 break;
383 }
384 }

引用了 port , 以及 timeout.

结构体成员变量说明

◆ driver

String driver
package

在文件 AdoConnector.xcsm319 行定义.

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

◆ hAdo

long hAdo
package

◆ port

int port = 1433
package

在文件 AdoConnector.xcsm8 行定义.

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

◆ timeout

int timeout = 0
package

在文件 AdoConnector.xcsm9 行定义.

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