Skip to content

Commit fbc0608

Browse files
committed
Update documentation.
Fix spelling errors; reword sections that didn't contain original content.
1 parent 2d128fe commit fbc0608

File tree

10 files changed

+71
-62
lines changed

10 files changed

+71
-62
lines changed

docs/content/api/mysql-command.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2016-10-16
2+
lastmod: 2017-11-06
33
date: 2016-10-16
44
menu:
55
main:
@@ -11,10 +11,10 @@ weight: 20
1111
MySqlCommand
1212
==============
1313

14-
MySqlCommand implements the [ADO.NET DbCommand class](https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbcommand),
14+
`MySqlCommand` implements the [ADO.NET DbCommand class](https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbcommand);
1515
please refer to its documentation.
1616

17-
Additionally, MySqlCommand provides the following public properties and methods that may be used:
17+
Additionally, `MySqlCommand` provides the following public properties and methods that may be used:
1818

1919
### Constructors
2020
`public MySqlCommand()`
@@ -41,5 +41,6 @@ constructor accepting command SQL, connection object, and transaction object
4141
### Additional Properties
4242
`public long LastInsertedId`
4343

44-
Holds the value of the LastInsertedId after an SQL command inserting a row has been executed
44+
Holds the first automatically-generated ID for a value inserted in an `AUTO_INCREMENT` column in the last statement.
45+
See [`LAST_INSERT_ID()`](https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_last-insert-id) for more information.
4546
***

docs/content/api/mysql-connection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2016-10-16
2+
lastmod: 2017-11-06
33
date: 2016-10-16
44
menu:
55
main:
@@ -11,7 +11,7 @@ weight: 10
1111
MySqlConnection
1212
=================
1313

14-
MySqlConnection implements the [ADO.NET DbConnection class](https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbconnection),
14+
MySqlConnection implements the [ADO.NET DbConnection class](https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbconnection);
1515
please refer to its documentation.
1616

1717
Additionally, MySqlConnection provides the following public properties and methods that may be used:

docs/content/api/mysql-data-reader.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2016-10-16
2+
lastmod: 2017-11-06
33
date: 2016-10-16
44
menu:
55
main:
@@ -11,7 +11,7 @@ weight: 30
1111
MySqlDataReader
1212
=================
1313

14-
MySqlDataReader implements the [ADO.NET DbDataReader class](https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbdatareader),
14+
MySqlDataReader implements the [ADO.NET DbDataReader class](https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbdatareader);
1515
please refer to its documentation.
1616

1717
Additionally, MySqlDataReader provides the following public properties and methods that may be used:
@@ -26,3 +26,6 @@ Gets the value of the specified column as an sbyte
2626

2727
Gets the value of the specified column as a DateTimeOffset with an offset of 0
2828
***
29+
`public ReadOnlyCollection<DbColumn> GetColumnSchema()`
30+
31+
Implements the new [`IDbColumnSchemaGenerator.GetColumnSchema`](https://docs.microsoft.com/en-us/dotnet/api/system.data.common.idbcolumnschemagenerator.getcolumnschema) interface that returns metadata about the columns in the result set.

docs/content/connection-options.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2016-10-16
2+
lastmod: 2017-11-06
33
date: 2016-10-16
44
title: Connection Options
55
weight: 30
@@ -22,32 +22,32 @@ These are the basic options that need to be defined to connect to a MySQL databa
2222
<thead>
2323
<th style="width: 20%">Name</th>
2424
<th style="width: 10%">Default</th>
25-
<th style="width: 70%">Descriotion</th>
25+
<th style="width: 70%">Description</th>
2626
</thead>
2727
<tr>
2828
<td>Host, Server, Data Source, DataSource, Address, Addr, Network Address</td>
2929
<td>localhost</td>
30-
<td>The name or network address of the instance of MySQL to which to connect. Multiple hosts can be specified separated by commas. This can be useful where multiple MySQL servers are configured for replication and you are not concerned about the precise server you are connecting to. No attempt is made by the provider to synchronize writes to the database, so take care when using this option. In Unix environment with Mono, this can be a fully qualified path to a MySQL socket file. With this configuration, the Unix socket is used instead of the TCP/IP socket. Currently, only a single socket name can be given, so accessing MySQL in a replicated environment using Unix sockets is not currently supported.</td>
30+
<td>The host name or network address of the MySQL Server to which to connect. Multiple hosts can be specified in a comma-delimited list.<br>On Unix-like systems, this can be a fully qualified path to a MySQL socket file, which will cause a Unix socket to be used instead of a TCP/IP socket. Only a single socket name can be specified.</td>
3131
</tr>
3232
<tr>
3333
<td>Port</td>
3434
<td>3306</td>
35-
<td>The port MySQL is using to listen for connections.</td>
35+
<td>The TCP port on which MySQL Server is listening for connections.</td>
3636
</tr>
3737
<tr>
3838
<td>User Id, UserID, Username, Uid, User name, User</td>
3939
<td></td>
40-
<td>The MySQL login account being used.</td>
40+
<td>The MySQL user ID.</td>
4141
</tr>
4242
<tr>
4343
<td>Password, pwd</td>
4444
<td></td>
45-
<td>The password for the MySQL account being used.</td>
45+
<td>The password for the MySQL user.</td>
4646
</tr>
4747
<tr>
4848
<td>Database, Initial Catalog</td>
4949
<td></td>
50-
<td>The case-sensitive name of the database to use initially. This is not required.</td>
50+
<td>(Optional) The case-sensitive name of the initial database to use. This may be required if the MySQL user account only has access rights to particular databases on the server.</td>
5151
</tr>
5252
</table>
5353

@@ -60,58 +60,58 @@ These are the options that need to be used in order to configure a connection to
6060
<thead>
6161
<th style="width: 20%">Name</th>
6262
<th style="width: 10%">Default</th>
63-
<th style="width: 70%">Descriotion</th>
63+
<th style="width: 70%">Description</th>
6464
</thead>
6565
<tr>
6666
<td>SSL Mode, SslMode</td>
6767
<td>Preferred</td>
6868
<td>This option has the following values:
6969
<ul>
70-
<li><b>Preferred</b> - this is the default. Use SSL if the server supports it.</li>
71-
<li><b>None</b> - do not use SSL.</li>
72-
<li><b>Required</b> - Always use SSL. Deny connection if server does not support SSL. Do not validate CA or hostname.</li>
73-
<li><b>VerifyCA</b> - Always use SSL. Validate the CA but tolerate hostname mismatch.</li>
74-
<li><b>VerifyFull</b> - Always use SSL. Validate CA and hostname.</li>
70+
<li><b>Preferred</b> - (this is the default). Use SSL if the server supports it.</li>
71+
<li><b>None</b> - Do not use SSL.</li>
72+
<li><b>Required</b> - Always use SSL. Deny connection if server does not support SSL. Does not validate CA or hostname.</li>
73+
<li><b>VerifyCA</b> - Always use SSL. Validates the CA but tolerates hostname mismatch.</li>
74+
<li><b>VerifyFull</b> - Always use SSL. Validates CA and hostname.</li>
7575
</ul>
7676
</td>
7777
</tr>
7878
<tr>
7979
<td>Certificate File, CertificateFile</td>
8080
<td></td>
81-
<td>This option specifies the path to a certificate file in a PEM Encoded (.pem) or PKCS #12 (.pfx) format. </td>
81+
<td>Specifies the path to a certificate file in a PEM Encoded (.pem) or PKCS #12 (.pfx) format.</td>
8282
</tr>
8383
<tr>
8484
<td>Certificate Password, CertificatePassword </td>
8585
<td></td>
86-
<td>Specifies a password that is used in conjunction with a certificate specified using the option CertificateFile. Not required if the certificate file is not password protected.</td>
86+
<td>Specifies the password for the certificate specified using the <code>CertificateFile</code> option. Not required if the certificate file is not password protected.</td>
8787
</tr>
8888
<tr>
8989
<td>CA Certificate File, CACertificateFile</td>
9090
<td></td>
91-
<td>This option specifies the path to a CA certificate file in a PEM Encoded (.pem) format. This should be used in with <code>SslMode=VerifyCA</code> or <code>SslMode=VerifyFull</code> to enable verification of a CA certificate that is not trusted by the Operating System's certificate store.</td>
91+
<td>This option specifies the path to a CA certificate file in a PEM Encoded (.pem) format. This should be used in with <code>SslMode=VerifyCA</code> or <code>SslMode=VerifyFull</code> to enable verification of a CA certificate that is not trusted by the Operating System's certificate store.</td>
9292
</tr>
9393
</table>
9494

9595
Connection Pooling Options
9696
--------------------------
9797

98-
Connection pooling is enabled by default. These options are used to configure it.
98+
Connection pooling is enabled by default. These options are used to configure it.
9999

100100
<table class="table table-striped table-hover">
101101
<thead>
102102
<th style="width: 20%">Name</th>
103103
<th style="width: 10%">Default</th>
104-
<th style="width: 70%">Descriotion</th>
104+
<th style="width: 70%">Description</th>
105105
</thead>
106106
<tr>
107107
<td>Pooling</td>
108108
<td>true</td>
109-
<td>When true, the MySqlConnection object is drawn from the appropriate pool, or if necessary, is created and added to the appropriate pool. Recognized values are true, false, yes, and no.</td>
109+
<td>Enables connection pooling. When pooling is enabled, <code>MySqlConnection.Open</code> retrieves an open connection from the pool if one is available (opening a new connection if not), and <code>Close</code>/<code>Dispose</code> returns the open connection to the pool.</td>
110110
</tr>
111111
<tr>
112112
<td>Connection Lifetime, ConnectionLifeTime</td>
113113
<td>0</td>
114-
<td>When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. This is useful in clustered configurations to force load balancing between a running server and a server just brought online. A value of zero (0) means pooled connections will never incur a ConnectionLifeTime timeout.</td>
114+
<td>Controls the maximum length of time a connection to the server can be open. Connections that are returned to the pool are destroyed if it's been more than <code>ConnectionLifeTime</code> seconds since the connection was created. The default value of zero (0) means pooled connections will never incur a ConnectionLifeTime timeout.</td>
115115
</tr>
116116
<tr>
117117
<td>Connection Reset, ConnectionReset </td>
@@ -121,7 +121,7 @@ Connection pooling is enabled by default. These options are used to configure i
121121
<tr>
122122
<td>Connection Idle Timeout, ConnectionIdleTimeout</td>
123123
<td>180</td>
124-
<td>The amount of time in seconds that a connection can remain idle in the pool. Any connection that is idle for longer is subject to being closed by a background task that runs every minute, unless there are only MinimumPoolSize connections left in the pool. A value of zero (0) means pooled connections will never incur a ConnectionIdleTimeout.</td>
124+
<td>The amount of time in seconds that a connection can remain idle in the pool. Any connection that is idle for longer is subject to being closed by a background task that runs every minute, unless there are only MinimumPoolSize connections left in the pool. A value of zero (0) means pooled connections will never incur a ConnectionIdleTimeout, and if the pool grows to its maximum size, it will never get smaller.</td>
125125
</tr>
126126
<tr>
127127
<td>Maximum Pool Size, Max Pool Size, MaximumPoolsize, maxpoolsize</td>
@@ -138,13 +138,13 @@ Connection pooling is enabled by default. These options are used to configure i
138138
Other Options
139139
-------------
140140

141-
These are the other options that MySqlConnector supports. They are set to sensible defaults and typically do not need to be tweaked.
141+
These are the other options that MySqlConnector supports. They are set to sensible defaults and typically do not need to be tweaked.
142142

143143
<table class="table table-striped table-hover">
144144
<thead>
145145
<th style="width: 20%">Name</th>
146146
<th style="width: 10%">Default</th>
147-
<th style="width: 70%">Descriotion</th>
147+
<th style="width: 70%">Description</th>
148148
</thead>
149149
<tr>
150150
<td>AllowPublicKeyRetrieval, Allow Public Key Retrieval</td>
@@ -157,7 +157,8 @@ These are the other options that MySqlConnector supports. They are set to sensi
157157
<tr>
158158
<td>AllowUserVariables, Allow User Variables</td>
159159
<td>false</td>
160-
<td>Setting this to true indicates that the provider expects user variables in the SQL.</td>
160+
<td>Allows user-defined variables (prefixed with <code>@</code>) to be used in SQL statements. The default value (<code>false</code>)
161+
only allows <code>@</code>-prefixed names to refer to command parameters.</td>
161162
</tr>
162163
<tr>
163164
<td>Compress, Use Compression, UseCompression</td>
@@ -186,7 +187,7 @@ These are the other options that MySqlConnector supports. They are set to sensi
186187
<tr>
187188
<td>Keep Alive, Keepalive</td>
188189
<td>0</td>
189-
<td>TCP Keepalive idle time. A value of 0 indicates that the OS Default keepalive settings are used.
190+
<td>TCP Keepalive idle time. A value of 0 indicates that the OS Default keepalive settings are used.
190191
On Windows, a value greater than 0 is the idle connection time, measured in seconds, before the first keepalive packet is sent.
191192
Due to limitations in .NET Core, Unix-based Operating Systems will always use the OS Default keepalive settings.</td>
192193
</tr>
@@ -224,7 +225,7 @@ These are the other options that MySqlConnector supports. They are set to sensi
224225
<tr>
225226
<td>Treat Tiny As Boolean, TreatTinyAsBoolean</td>
226227
<td>true</td>
227-
<td>When set to true, tinyint(1) values are returned as booleans. Setting this to false causes tinyint(1) to be returned as sbyte/byte.</td>
228+
<td>When set to true, tinyint(1) values are returned as booleans. Setting this to false causes tinyint(1) to be returned as sbyte/byte.</td>
228229
</tr>
229230
<tr>
230231
<td>Use Affected Rows, UseAffectedRows</td>

docs/content/home.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2016-10-16
2+
lastmod: 2017-11-06
33
date: 2016-10-16
44
title: Home
55
weight: 10
@@ -15,7 +15,7 @@ Home
1515
MySqlConnector is an [ADO.NET](https://msdn.microsoft.com/en-us/library/e80y5yhx.aspx) data
1616
provider for [MySQL](https://www.mysql.com/). It provides implementations of
1717
`DbConnection`, `DbCommand`, `DbDataReader`, `DbTransaction` &ndash; the classes
18-
needed to query and update databases from managed code. Its features include:
18+
needed to query and update databases from managed code. Its features include:
1919

2020
* .NET Core Compatibility
2121
* Truly Asynchronous: async functions implement asynchronous I/O
@@ -47,7 +47,7 @@ and is not based on [Oracle's Connector/NET](https://github.com/mysql/mysql-conn
4747
<a href="https://github.com/mysql-net/MySqlConnector">GitHub</a>
4848
</td>
4949
<td>
50-
Closed Development Roadmap. Code is viewable on
50+
Closed Development Roadmap. Code is viewable on
5151
<a href="https://github.com/mysql/mysql-connector-net">GitHub</a>,
5252
some issues addressed in <a href="http://forums.mysql.com/list.php?38">Forums</a>
5353
</td>

docs/content/overview/installing.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2017-10-21
2+
lastmod: 2017-11-06
33
date: 2016-10-16
44
menu:
55
main:
@@ -11,7 +11,15 @@ weight: 10
1111
Installing
1212
==========
1313

14-
The recommended way of installing MySqlConnector is through [NuGet](https://www.nuget.org/packages/MySqlConnector/)
14+
The recommended way of installing MySqlConnector is through [NuGet](https://www.nuget.org/packages/MySqlConnector/).
15+
16+
### Automatically
17+
18+
If using the new project system, run: `dotnet add package MySqlConnector`
19+
20+
Or, in Visual Studio, use the _NuGet Package Manager_ to browse for and install `MySqlConnector`.
21+
22+
### Manually
1523

1624
**Step 1:** Add MySqlConnector to the dependencies in your `csproj` file:
1725

@@ -25,7 +33,7 @@ The recommended way of installing MySqlConnector is through [NuGet](https://www.
2533
</PropertyGroup>
2634

2735
<ItemGroup>
28-
<PackageReference Include="MySqlConnector" Version="0.28.2" />
36+
<PackageReference Include="MySqlConnector" Version="0.30.0" />
2937
</ItemGroup>
3038

3139
</Project>

docs/content/overview/known-issues.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2017-03-27
2+
lastmod: 2017-11-06
33
date: 2017-03-27
44
menu:
55
main:
@@ -12,5 +12,4 @@ Known Issues
1212
============
1313

1414
* Not all MySQL data types are supported.
15-
* Many `MySql.Data` connection string settings are not supported by this library. See [Connection Options](connection-options/) for a list of supported options.
16-
* Only the `mysql_native_password` and `mysql_old_password` authentication plugins are supported.
15+
* Some `MySql.Data` connection string settings are not supported by this library. See [Connection Options](connection-options/) for a list of supported options.

docs/content/overview/use-with-orms.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2016-10-16
2+
lastmod: 2017-11-06
33
date: 2016-10-16
44
menu:
55
main:
@@ -15,6 +15,7 @@ This library is compatible with popular .NET ORMs including:
1515

1616
* [Dapper](https://github.com/StackExchange/dapper-dot-net) ([NuGet](https://www.nuget.org/packages/Dapper))
1717
* [NReco.Data](https://github.com/nreco/data) ([NuGet](https://www.nuget.org/packages/NReco.Data))
18+
* [ServiceStack.OrmLite](https://github.com/ServiceStack/ServiceStack.OrmLite) ([MyGet](https://www.myget.org/feed/servicestack/package/nuget/ServiceStack.OrmLite.MySqlConnector))
1819
* [SimpleStack.Orm](https://github.com/SimpleStack/simplestack.orm) ([NuGet](https://www.nuget.org/packages/SimpleStack.Orm.MySQLConnector))
1920

2021
For Entity Framework support, use:

docs/content/tutorials/best-practices.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2017-10-21
2+
lastmod: 2017-11-06
33
date: 2016-10-16
44
menu:
55
main:
@@ -14,7 +14,7 @@ Best Practices
1414
## Asynchronous Operation
1515

1616
MySqlConnector is fully asynchronous, supporting the async ADO.NET methods added in .NET 4.5 without blocking
17-
or using `Task.Run` to run synchronous methods on a background thread. Programmers implementing MySqlConnector
17+
or using `Task.Run` to run synchronous methods on a background thread. Programmers implementing MySqlConnector
1818
should be familiar with [Async/Await - Best Practices in Asynchronous Programming](https://msdn.microsoft.com/en-us/magazine/jj991977.aspx).
1919

2020
### Always Use Async when possible
@@ -98,7 +98,7 @@ uses cached `Task<bool>` objects for its `true` and `false` return values.)
9898
### Example Console Application
9999

100100
In order to get the full benefit of asynchronous operation, every method in the call stack that eventually calls
101-
MySqlConnector should be implemented as an async method. The exception is the `static void Main` method in a Console Application.
101+
MySqlConnector should be implemented as an async method.
102102

103103
Example assumes a [configured AppDb](overview/configuration) object in the `MySqlConnector.Examples` namespace.
104104

@@ -110,15 +110,11 @@ namespace MySqlConnector.Examples
110110
{
111111
public class Program
112112
{
113-
public static void Main(string[] args)
114-
{
115-
MainAsync(args).GetAwaiter().GetResult();
116-
}
117-
118-
public static async Task MainAsync(string[] args)
113+
public static async Task Main(string[] args)
119114
{
120115
var tasks = new List<Task>();
121-
for (var i=0; i<100; i++){
116+
for (var i=0; i<100; i++)
117+
{
122118
tasks.Add(Controllers.SleepOne());
123119
}
124120
// these 100 queries should all complete in around
@@ -150,11 +146,11 @@ namespace MySqlConnector.Examples
150146

151147
<div class="alert alert-warning">
152148
Using Synchronous Methods can have adverse effects on the managed thread pool and cause slowdowns or lock-ups
153-
if not properly tuned. The recommended approach is to use all Asynchronous Methods.
149+
if not properly tuned. The recommended approach is to use all Asynchronous Methods.
154150
</div>
155151

156152
If you must use synchronous methods, ensure that your thread pool is at least the size of the number of
157-
concurrent connections you plan to support. For example, if you are creating a web server using
153+
concurrent connections you plan to support. For example, if you are creating a web server using
158154
synchronous methods that needs to support serving 500 Requests Per Second, set the minimum thread
159155
pool size to 500.
160156

0 commit comments

Comments
 (0)