MORMOT数据库连接池
MORMOT數(shù)據(jù)庫(kù)連接池
MORMOT封裝了一堆的PROPS控件,用于連接各種數(shù)據(jù)庫(kù)。
MORMOT的封裝是武裝到了牙齒的,這堆PROPS控件居然數(shù)據(jù)庫(kù)連接池也封裝好了。這就為我們省了不少事,筆者非常喜歡!
下面拿TOleDBMSSQLConnectionProperties控件源碼為例作說(shuō)明:
TOleDBMSSQLConnectionProperties = class(TOleDBConnectionProperties)
?TOleDBConnectionProperties = class(TSQLDBConnectionPropertiesThreadSafe)
constructor TSQLDBConnectionPropertiesThreadSafe.Create(const aServerName,
aDatabaseName, aUserID, aPassWord: RawUTF8);
begin
fConnectionPool := TObjectList.Create; ? //PROPS一創(chuàng)建就創(chuàng)建了數(shù)據(jù)庫(kù)連接池
fLatestConnectionRetrievedInPool := -1;
InitializeCriticalSection(fConnectionCS);
inherited Create(aServerName,aDatabaseName,aUserID,aPassWord);
end;
轉(zhuǎn)載于:https://www.cnblogs.com/hnxxcxg/p/8045954.html
總結(jié)
以上是生活随笔為你收集整理的MORMOT数据库连接池的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Integer类源码浅析
- 下一篇: element ui中dialog相关问