Skip to content

Commit 7479bc7

Browse files
committed
Merge pull request rust-postgres#73 from s-panferov/patch-1
Update README
2 parents b81acaa + a89d4b5 commit 7479bc7

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ Documentation is available at https://sfackler.github.io/doc/postgres
55

66
[![Build Status](https://travis-ci.org/sfackler/rust-postgres.png?branch=master)](https://travis-ci.org/sfackler/rust-postgres)
77

8+
```toml
9+
# Cargo.toml
10+
[dependencies.postgres]
11+
git = "https://github.com/sfackler/rust-postgres.git"
12+
```
13+
14+
```toml
15+
# Optional features
16+
features = ["uuid_type"]
17+
```
18+
819
## Overview
920
Rust-Postgres is a pure-Rust frontend for the popular PostgreSQL database. It
1021
exposes a high level interface in the vein of JDBC or Go's `database/sql`
@@ -201,6 +212,13 @@ types. The driver currently supports the following conversions:
201212
<td>time::Timespec</td>
202213
<td>TIMESTAMP, TIMESTAMP WITH TIME ZONE</td>
203214
</tr>
215+
<tr>
216+
<td>
217+
<a href="https://github.com/rust-lang/uuid">uuid::Uuid</a>
218+
(<a href="#optional-features">optional</a>)
219+
</td>
220+
<td>UUID</td>
221+
</tr>
204222
<tr>
205223
<td>types::range::Range&lt;i32&gt;</td>
206224
<td>INT4RANGE</td>
@@ -279,6 +297,18 @@ types. The driver currently supports the following conversions:
279297
More conversions can be defined by implementing the `ToSql` and `FromSql`
280298
traits.
281299

300+
## Optional features
301+
302+
### UUID type
303+
304+
To enable the [UUID](http://www.postgresql.org/docs/9.4/static/datatype-uuid.html) type just add "uuid_type" to features list:
305+
306+
```toml
307+
[dependencies.postgres]
308+
git = ...
309+
features = ["uuid_type"]
310+
```
311+
282312
## Development
283313
Like Rust itself, Rust-Postgres is still in the early stages of development, so
284314
don't be surprised if APIs change and things break. If something's not working

0 commit comments

Comments
 (0)