Skip to content

BaseClientBuilder ​

Top-level builder for the mooSQL client instance.

doBuild ​

Build and return DBInsCash:

c#
doBuild()

Registration hooks ​

useCache ​

c#
useCache(ICache cache)

useDataBase ​

c#
useDataBase(Func<int, DataBase> loadDBByPostion)
useDataBase(int position, Func<DataBase> createDBConfig)
useDataBase(List<DBPosition> positions)

useDBXMLConfig ​

XML config for DialectFactory:

c#
useDBXMLConfig(string confipath)

useSlave ​

Primary/replica teams:

c#
useSlave(Func<SlaveTeam, SlaveTeam> createTeam)

useSlave(SlaveTeam slaveTeam)

useCashHolder ​

Custom DBInsCash holder (advanced):

c#
useCashHolder(DBInsCash insCash)

useDialectFactory ​

Custom dialect factory for unsupported database kinds:

c#
useDialectFactory(IDialectFactory dialectFactory)

useEntityAnalyseFactory ​

c#
useEntityAnalyseFactory(IEntityAnalyseFactory entityAnalyseFactory)

useEnityAnalyser ​

e.g. SqlSugar / UCML entity parsers:

c#
useEnityAnalyser(IEntityAnalyser entityAnalyser)

useWatcher ​

SQL execution hooks / logging:

c#
useWatcher(IWatchor watcher)

useLogger ​

c#
useLogger(IExeLog logger)

Events ​

onBeforeExecute ​

c#
onBeforeExecute(Func<ExeContext ,  string,string> handler)

onAfterExecute ​

c#
onAfterExecute(Func<ExeContext, string, string> handler)

onExecuteError ​

c#
onExecuteError(Func<ExeContext, Exception, string, string> handler)

onBuildSetFrag ​

c#
onBuildSetFrag(Func<SetFrag, SQLBuilder, bool> handler)

onBuildWhereFrag ​

c#
onBuildWhereFrag(Func<WhereFrag, SQLBuilder, bool> handler)

onCreatedSQL ​

c#
onCreatedSQL(Action<string, SQLBuilder> handler)