<commit_before>(*** hide ***)
#I "../../bin"

(**
SQLProvider
===========

A general .NET/Mono SQL database type provider. Current features:

* [LINQ queries](core/querying.html)
* Lazy schema exploration 
* Automatic constraint navigation
* [Individuals](core/individuals.html)
* Transactional [CRUD](core/crud.html) operations with identity support
* [Stored Procedures](core/programmability.html)
* [Functions](core/programmability.html)
* Packages (Oracle)
* [Composable Query](core/composable.html) integration
* Optional option types
* [Mapping to record types](core/mappers.html)
* Custom Operators
* Supports [Asynchronous Operations](core/async.html)
  
The provider currently has explicit implementations for the following database vendors:
 
* SQL Server
* SQLite
* PostgreSQL
* Oracle
* MySQL
* MsAccess

There is also an ODBC provider that will let you connect to any ODBC source with limited features. 

All database vendors except SQL Server and MS Access will require 3rd party ADO.NET connector objects to function. These are dynamically loaded at runtime so that the SQL provider project is not dependent on them. You must supply the location of the assemblies with the "ResolutionPath" static parameter.

SQLite is based on the .NET drivers found [here](http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki). You will need the correct version for your specific architecture and setup.

PostgreSQL is based on the .NET drivers found [here](http://npgsql.projects.pgfoundry.org/).  The type provider will make frequent calls to the database. I found that using the default settings for the PostgreSQL server on my Windows machine would deny the provider constant access - you may need to try setting  `Pooling=false` in the connection string, increasing timeouts or setting other relevant security settings to enable a frictionless experience.

MySQL is based on the .NET drivers found [here](http://dev.mysql.com/downloads/connector/net/1.0.html). You will need the correct version for your specific architecture and setup. You also need to specify ResolutionPath, which points to the folder containing the dll files for the MySQL driver.

Oracle is based on the current release (1172.16.17.32.2) of the managed ODP.NET driver found [here](http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html). However, although the managed version is recommended, it should also work with previous versions of the native driver.

<div class="row">
  <div class="span1"></div>
  <div class="span6">
    <div class="well well-small" id="nuget">
      The library can be <a href="https://nuget.org/packages/SQLProvider">installed from NuGet</a>:
      <pre>PM> Install-Package SQLProvider</pre>
    </div>
  </div>
  <div class="span1"></div>
</div>

Example
-------

This example demonstrates the use of the SQL type provider:

*)<commit_msg>Update index.fsx with more relevant Npgsql advice<commit_after>(*** hide ***)
#I "../../bin"

(**
SQLProvider
===========

A general .NET/Mono SQL database type provider. Current features:

* [LINQ queries](core/querying.html)
* Lazy schema exploration 
* Automatic constraint navigation
* [Individuals](core/individuals.html)
* Transactional [CRUD](core/crud.html) operations with identity support
* [Stored Procedures](core/programmability.html)
* [Functions](core/programmability.html)
* Packages (Oracle)
* [Composable Query](core/composable.html) integration
* Optional option types
* [Mapping to record types](core/mappers.html)
* Custom Operators
* Supports [Asynchronous Operations](core/async.html)
  
The provider currently has explicit implementations for the following database vendors:
 
* SQL Server
* SQLite
* PostgreSQL
* Oracle
* MySQL
* MsAccess

There is also an ODBC provider that will let you connect to any ODBC source with limited features. 

All database vendors except SQL Server and MS Access will require 3rd party ADO.NET connector objects to function. These are dynamically loaded at runtime so that the SQL provider project is not dependent on them. You must supply the location of the assemblies with the "ResolutionPath" static parameter.

SQLite is based on the .NET drivers found [here](http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki). You will need the correct version for your specific architecture and setup.

PostgreSQL is based on the Npgsql .NET drivers found [here](http://www.npgsql.org/doc/). The type provider will make frequent calls to the database. Npgsql provides a set of [performance related connection strings parameters](http://www.npgsql.org/doc/connection-string-parameters.html#performance) for tweaking its performance

MySQL is based on the .NET drivers found [here](http://dev.mysql.com/downloads/connector/net/1.0.html). You will need the correct version for your specific architecture and setup. You also need to specify ResolutionPath, which points to the folder containing the dll files for the MySQL driver.

Oracle is based on the current release (12.1.0.1.2) of the managed ODP.NET driver found [here](http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html). However, although the managed version is recommended, it should also work with previous versions of the native driver.

<div class="row">
  <div class="span1"></div>
  <div class="span6">
    <div class="well well-small" id="nuget">
      The library can be <a href="https://nuget.org/packages/SQLProvider">installed from NuGet</a>:
      <pre>PM> Install-Package SQLProvider</pre>
    </div>
  </div>
  <div class="span1"></div>
</div>

Example
-------

This example demonstrates the use of the SQL type provider:

*)
{'fraction_non_alphanumeric': 0.09973474801061008, 'fraction_numerical': 0.005128205128205128, 'mean_word_length': 4.644710578842315, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6574967', 'n_tokens_mistral': 1572, 'n_tokens_neox': 1516, 'n_words': 632}