MCPcopy Create free account
hub / github.com/acl-dev/acl / pgsql_conf

Method pgsql_conf

lib_acl_cpp/src/db/pgsql_conf.cpp:10–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace acl {
9
10pgsql_conf::pgsql_conf(const char* dbaddr, const char* dbname)
11{
12 acl_assert(dbaddr && *dbaddr);
13 acl_assert(dbname && *dbname);
14
15 // ��ַ��ʽ��[dbname@]dbaddr
16 const char* ptr = strchr(dbaddr, '@');
17 if (ptr != NULL) {
18 ptr++;
19 } else {
20 ptr = dbaddr;
21 }
22 acl_assert(*ptr);
23
24 dbaddr_ = acl_mystrdup(ptr);
25 dbname_ = acl_mystrdup(dbname);
26 dbkey_ = acl_concatenate(dbname, "@", dbaddr, NULL);
27 acl_lowercase(dbkey_);
28 dbuser_ = NULL;
29 dbpass_ = NULL;
30 charset_ = NULL;
31
32 dblimit_ = 0;
33 conn_timeout_ = 60;
34 rw_timeout_ = 60;
35}
36
37pgsql_conf::pgsql_conf(const pgsql_conf& conf)
38{

Callers

nothing calls this directly

Calls 4

acl_concatenateFunction · 0.85
acl_lowercaseFunction · 0.85
get_charsetMethod · 0.80
get_rw_timeoutMethod · 0.80

Tested by

no test coverage detected