Skip to content

Commit f700091

Browse files
committed
Now builds docs (with latest version of compiler if gen-package-version
is updated)
1 parent 2ff1a96 commit f700091

24 files changed

+82
-60
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/docs/docs.json
1212
/docs/public/mysql/
13+
/docs/public/taggedalgebraic/
1314
/docs/public/file_hashes.json
1415
/docs/public/index.html
1516
/docs/public/mysql.html

build-docs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ rm -rf docs_tmp ta
1616
rm source/mysql/package.o
1717

1818
dub --version
19-
dub run gen-package-version -- mysql --ddoc=ddoc --src=source
19+
if ! dub run gen-package-version -- mysql --ddoc=ddoc --src=source; then
20+
echo "Failed to build gen-package-version"
21+
exit 1
22+
fi
2023
rm source/mysql/packageVersion.d
2124

2225
echo Building ddox...
2326
cd ./ddox
24-
dub build
27+
if ! dub build; then
28+
echo "Failed to build ddox"
29+
exit 1
30+
fi
2531
cd ..
2632
echo Done building ddox...
2733

examples/homePage/dub.selections.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"libev": "5.0.0+4.04",
77
"libevent": "2.0.1+2.0.16",
88
"memutils": "0.4.13",
9+
"mysql-native": {"path":"../.."},
910
"openssl": "1.1.4+1.0.1g",
1011
"stdx-allocator": "2.77.5",
1112
"taggedalgebraic": "0.11.8",

source/mysql/commands.d

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
/++
2-
This module publicly imports `mysql.unsafe.commands`, which provides the
3-
Variant-based interface to mysql. In the future, this will switch to importing the
4-
`mysql.safe.commands`, which provides the @safe interface to mysql. Please see
5-
those two modules for documentation on the functions provided. It is highly
6-
recommended to import `mysql.safe.commands` and not the unsafe commands, as
7-
that is the future for mysql-native.
2+
This module publicly imports `mysql.unsafe.commands`. Please see that module for more documentation.
83
94
In the far future, the unsafe version will be deprecated and removed, and the
105
safe version moved to this location.

source/mysql/connection.d

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
/++
2-
This module publicly imports `mysql.unsafe.connection`, which provides
3-
backwards compatible functions for connecting to a MySQL/MariaDB server.
4-
5-
It is recommended instead to import `mysql.safe.connection`, which provides
6-
@safe-only mechanisms to connect to a database.
7-
8-
Note that the common pieces of the connection are documented and currently
9-
reside in `mysql.impl.connection`. The safe and unsafe portions of the API
10-
reside in `mysql.unsafe.connection` and `mysql.safe.connection` respectively.
11-
Please see these modules for information on using a MySQL `Connection` object.
2+
This module publicly imports `mysql.unsafe.connection`. Please see that module
3+
for more documentation.
124
135
In the future, this will migrate to importing `mysql.safe.connection`. In the
146
far future, the unsafe version will be deprecated and removed, and the safe

source/mysql/impl/connection.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/++
2-
Connect to a MySQL/MariaDB server.
2+
Implementation - Connection class.
33
44
WARNING:
55
This module is used to consolidate the common implementation of the safe and
@@ -1132,15 +1132,15 @@ unittest
11321132
cn.exec("DROP TABLE `dropConnection`");
11331133
}
11341134

1135-
/+
1135+
/*
11361136
Test Prepared's ability to be safely refcount-released during a GC cycle
11371137
(ie, `Connection.release` must not allocate GC memory).
11381138
11391139
Currently disabled because it's not guaranteed to always work
11401140
(and apparently, cannot be made to work?)
11411141
For relevant discussion, see issue #159:
11421142
https://github.com/mysql-d/mysql-native/issues/159
1143-
+/
1143+
*/
11441144
version(none)
11451145
debug(MYSQLN_TESTS)
11461146
{

source/mysql/impl/pool.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/++
2+
Implementation - Vibe.d MySQL Pool.
3+
24
Connect to a MySQL/MariaDB database using vibe.d's
35
$(LINK2 http://vibed.org/api/vibe.core.connectionpool/ConnectionPool, ConnectionPool).
46

source/mysql/impl/prepared.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/++
2-
Use a DB via SQL prepared statements.
2+
Implementation - Prepared statements.
33
44
WARNING:
55
This module is used to consolidate the common implementation of the safe and

source/mysql/impl/result.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/++
2-
Structures for data received: rows and result sets (ie, a range of rows).
2+
Implementation - Data result structures.
33
44
WARNING:
55
This module is used to consolidate the common implementation of the safe and

source/mysql/package.d

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ module mysql;
7575
// by default we do the unsafe API.
7676
public import mysql.unsafe;
7777

78+
// import the safe version for generating documentation.
79+
version(MySQLDocs)
80+
{
81+
// also document safe items
82+
import mysql.safe;
83+
84+
// also document forwarding modules
85+
import mysql.commands;
86+
import mysql.result;
87+
import mysql.pool;
88+
import mysql.prepared;
89+
import mysql.connection;
90+
}
91+
7892
debug(MYSQLN_TESTS) version = DoCoreTests;
7993
debug(MYSQLN_CORE_TESTS) version = DoCoreTests;
8094

0 commit comments

Comments
 (0)