Skip to content

Commit

Permalink
Updated README info and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
praeclarum committed Aug 10, 2012
1 parent 06c9bd2 commit d809287
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions README.mdown
@@ -1,31 +1,33 @@

Overview
===
# sqlite-net

sqlite-net is an open source, minimal library to allow .NET and Mono applications to store data in [http://www.sqlite.org SQLite 3 databases]. It is written in C# 3.0 and is meant to be simply compiled in with your projects. It was first designed to work with [http://monotouch.net/ MonoTouch] on the iPhone, but should work in any other CLI environment.
sqlite-net is an open source, minimal library to allow .NET and Mono applications to store data in [http://www.sqlite.org SQLite 3 databases]. It is written in C# and is meant to be simply compiled in with your projects. It was first designed to work with [MonoTouch](http://xamarin.com) on the iPhone, but has grown up to work on all the platforms (Mono for Android, .NET, Silverlight, WP7, WinRT, Azure, etc.).

sqlite-net was designed as a quick and convenient database layer. Its design follows from these *goals*:

* It should be very easy to integrate with existing projects and with MonoTouch projects.
* Very easy to integrate with existing projects and with MonoTouch projects.

* It is a thin wrapper over SQLite and should be fast and efficient. (The library should not be the performance bottleneck of your queries.)
* Thin wrapper over SQLite and should be fast and efficient. (The library should not be the performance bottleneck of your queries.)

* It provides very simple methods for executing queries safely (using parameters) and for retrieving the results of those query in a strongly typed fashion.
* Very simple methods for executing CRUD operations and queries safely (using parameters) and for retrieving the results of those query in a strongly typed fashion.

* It works with your data model without forcing you to change your classes. (Contains a small reflection-driven ORM layer.)
* Works with your data model without forcing you to change your classes. (Contains a small reflection-driven ORM layer.)

* It has 0 dependencies aside from a [http://www.sqlite.org/download.html compiled form of the sqlite3 library].
* 0 dependencies aside from a [compiled form of the sqlite2 library](http://www.sqlite.org/download.html).

*Non-goals* include:

* No `IQueryable` support for constructing queries. You can of course use LINQ on the results of queries, but you cannot use it to construct the queries.

* Not an implementation of `IDbConnection` and its family. This is not a full SQLite driver. If you need that, go get [http://sqlite.phxsoftware.com/ System.Data.SQLite] or [http://code.google.com/p/csharp-sqlite/ csharp-sqlite].
* Not an ADO.NET implementation. This is not a full SQLite driver. If you need that, use [Mono.Data.SQLite](http://www.mono-project.com/SQLite) or [csharp-sqlite](http://code.google.com/p/csharp-sqlite/).


## Meta

This is an open source project that welcomes contributions/suggestions/bug reports from those who use it. If you have any ideas on how to improve the library, please [post an issue here on github](https://github.com/praeclarum/sqlite-net/issues). Please check out the [How to Contribute](https://github.com/praeclarum/sqlite-net/wiki/How-to-Contribute).


The design is similar to that used by Demis Bellot in the [http://code.google.com/p/servicestack/source/browse/#svn/trunk/Common/ServiceStack.Common/ServiceStack.OrmLite OrmLite sub project of ServiceStack].
# Example Time!

Documentation
===
Please consult the Wiki for, ahem, [complete documentation](https://github.com/praeclarum/sqlite-net/wiki).

The library contains simple attributes that you can use to control the construction of tables. In a simple stock program, you might use:

Expand Down Expand Up @@ -53,8 +55,8 @@ API for mobile applications in order to increase reponsiveness.

Both APIs are explained in the two sections below.

Synchronous API
---
## Synchronous API

Once you have defined your entity, you can automatically generate tables in your database by calling `CreateTable`:

var db = new SQLiteConnection("foofoo");
Expand Down Expand Up @@ -100,8 +102,8 @@ The generic parameter to the `Query` method specifies the type of object to crea

You can perform low-level updates of the database using the `Execute` method.

Asynchronous API
---
## Asynchronous API

The asynchronous library uses the Task Parallel Library (TPL). As such, normal use of `Task` objects, and the `async` and `await` keywords
will work for you.

Expand Down Expand Up @@ -153,21 +155,18 @@ Another helpful method is `ExecuteScalarAsync`. This allows you to return a scal
});


Special note on use within Metro-style
===
sqlite-net is fully compliant with Metro-style. This library will pass Microsoft Store validation.
## Special note on use within WinRT/Windows 8/Metro Style/whatevr

Users should note:
sqlite-net is fully compliant with WinRT Metro-style apps and will pass Microsoft Store validation.

Please note:

* Database files will always be created in the path returned by `Windows.Storage.ApplicationData.Current.LocalFolder.Path`.

* You will need a copy of sqlite3.dll that has been compiled against SQLite.org's WinRT branch. Although this isn't in mainstream
support, it is expected to be. You can find more information on that and download a properly compiled sqlite3.dll from
[https://github.com/mbrit/sqlite-metrostyle].

Meta
===

This is an open source project that welcomes contributions/suggestions/bug reports from those who use it. If you have any ideas on how to improve the library, please contact [mailto:fak@praeclarum.org Frank Krueger].
* We supply a [WinRT/Windows 8 sqlite3.dll](https://github.com/praeclarum/sqlite-net/tree/master/lib/metro)


0 comments on commit d809287

Please sign in to comment.