Skip to content

Commit 710168d

Browse files
committed
In-Progress Packaging / Documentation improvements
1 parent a537bea commit 710168d

File tree

9 files changed

+281
-96
lines changed

9 files changed

+281
-96
lines changed

Adapter/adapter_config.js

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ global.api_dir = path.join(adapter_dir, "api");
3030
global.spi_dir = path.join(adapter_dir, "impl");
3131
global.spi_doc_dir = path.join(spi_dir, "SPI-documentation");
3232
global.api_doc_dir = path.join(parent_dir, "API-documentation");
33+
global.backend_doc_dir = path.join(parent_dir, "Backend-documentation");
3334
global.converters_dir = path.join(parent_dir, "Converters");
3435

3536
global.spi_module = path.join(spi_dir, "SPI.js");

Adapter/impl/mysql/mysql_service_provider.js

+1-19
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,8 @@ exports.loadRequiredModules = function() {
5252
};
5353

5454

55-
var MysqlDefaultConnectionProperties = {
56-
"implementation" : "mysql",
57-
"database" : "test",
58-
59-
"mysql_host" : "localhost",
60-
"mysql_port" : 3306,
61-
"mysql_user" : "root",
62-
"mysql_password" : "",
63-
"mysql_charset" : "UTF8MB4",
64-
"mysql_sql_mode" : "STRICT_ALL_TABLES",
65-
"mysql_socket" : null,
66-
"debug" : true,
67-
"mysql_trace" : false,
68-
"mysql_debug" : false,
69-
"mysql_pool_size": 10
70-
};
71-
72-
7355
exports.getDefaultConnectionProperties = function() {
74-
return MysqlDefaultConnectionProperties;
56+
return require(path.join(backend_doc_dir,"mysql_properties.js"));
7557
};
7658

7759

Adapter/impl/ndb/ndb_service_provider.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ catch(e) {
3535
var udebug = unified_debug.getLogger("ndb_service_provider.js");
3636

3737
var NdbDefaultConnectionProperties =
38-
require(path.join(spi_doc_dir, "NDB_Properties"));
38+
require(path.join(backend_doc_dir, "ndb_properties"));
3939

4040
exports.loadRequiredModules = function() {
4141
var err, ldp, module, msg;

Backend-documentation/mysql.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
```
2+
var MysqlDefaultConnectionProperties = {
3+
"implementation" : "mysql",
4+
"database" : "test",
5+
6+
"mysql_host" : "localhost",
7+
"mysql_port" : 3306,
8+
"mysql_user" : "root",
9+
"mysql_password" : "",
10+
"mysql_charset" : "UTF8MB4",
11+
"mysql_sql_mode" : "STRICT_ALL_TABLES",
12+
"mysql_socket" : null,
13+
"debug" : true,
14+
"mysql_trace" : false,
15+
"mysql_debug" : false,
16+
"mysql_pool_size": 10
17+
};
18+
```
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
MySQL Connection Properties
3+
4+
*/
5+
6+
var MysqlDefaultConnectionProperties = {
7+
"implementation" : "mysql",
8+
"database" : "test",
9+
10+
"mysql_host" : "localhost",
11+
"mysql_port" : 3306,
12+
"mysql_user" : "root",
13+
"mysql_password" : "",
14+
"mysql_charset" : "UTF8MB4",
15+
"mysql_sql_mode" : "STRICT_ALL_TABLES",
16+
"mysql_socket" : null,
17+
"debug" : true,
18+
"mysql_trace" : false,
19+
"mysql_debug" : false,
20+
"mysql_pool_size": 10
21+
};
22+
23+
24+
/* This file is valid JavaScript
25+
*/
26+
module.exports = MysqlDefaultConnectionProperties;

Backend-documentation/ndb.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
```
2+
var NdbDefaultConnectionProperties = {
3+
"implementation" : "ndb", // This must always be "ndb".
4+
5+
"ndb_connectstring" : "localhost:1186", // MySQL Cluster Connect String
6+
"database" : "test", // MySQL Database name
7+
"mysql_user" : "root",
8+
9+
/* The next 3 properties control the behavior when opening a connection. */
10+
"ndb_connect_retries" : 4, // if < 0, keep trying forever
11+
"ndb_connect_delay" : 5, // full seconds between connection retries
12+
"ndb_connect_verbose" : 0, // enable extra console output
13+
14+
"linger_on_close_msec": 500, /* When a client closes a DBConnectionPool,
15+
the underlying connection is kept open
16+
for this many milliseconds in case
17+
another client tries to re-open it.
18+
*/
19+
20+
"use_ndb_async_api" : false, /* If true, some operations will be
21+
executed using asynchronous calls for
22+
improved concurrency. If false, the
23+
number of operations in transit will be
24+
limited to one per uv worker thread.
25+
*/
26+
27+
"ndb_session_pool_min" : 4,
28+
"ndb_session_pool_max" : 100, /* Each NdbConnectionPool maintains a
29+
pool of DBSessions (and their underlying
30+
Ndb objects). These parameters set
31+
guidelines for the size of that pool.
32+
*/
33+
34+
"ndb_session_concurrency" : 4 /* The number of concurrent transactions
35+
in an Ndb Session. Only one
36+
transaction at a time is visible to the
37+
user, but one may start before previous
38+
ones have finished executing.
39+
*/
40+
};
41+
```
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
3+
/*
4+
NDB Connection Properties
5+
6+
*/
7+
8+
var NdbDefaultConnectionProperties = {
9+
"implementation" : "ndb", // This must always be "ndb".
10+
11+
"ndb_connectstring" : "localhost:1186", // MySQL Cluster Connect String
12+
"database" : "test", // MySQL Database name
13+
"mysql_user" : "root",
14+
15+
/* The next 3 properties control the behavior when opening a connection. */
16+
"ndb_connect_retries" : 4, // if < 0, keep trying forever
17+
"ndb_connect_delay" : 5, // full seconds between connection retries
18+
"ndb_connect_verbose" : 0, // enable extra console output
19+
20+
"linger_on_close_msec": 500, /* When a client closes a DBConnectionPool,
21+
the underlying connection is kept open
22+
for this many milliseconds in case
23+
another client tries to re-open it.
24+
*/
25+
26+
"use_ndb_async_api" : false, /* If true, some operations will be
27+
executed using asynchronous calls for
28+
improved concurrency. If false, the
29+
number of operations in transit will be
30+
limited to one per uv worker thread.
31+
*/
32+
33+
"ndb_session_pool_min" : 4,
34+
"ndb_session_pool_max" : 100, /* Each NdbConnectionPool maintains a
35+
pool of DBSessions (and their underlying
36+
Ndb objects). These parameters set
37+
guidelines for the size of that pool.
38+
*/
39+
40+
"ndb_session_concurrency" : 4 /* The number of concurrent transactions
41+
in an Ndb Session. Only one
42+
transaction at a time is visible to the
43+
user, but one may start before previous
44+
ones have finished executing.
45+
*/
46+
};
47+
48+
/* This file is valid JavaScript
49+
*/
50+
module.exports = NdbDefaultConnectionProperties;

0 commit comments

Comments
 (0)