all: add postgres to docs

Reviewed By: alexsn

Differential Revision: D18245079

fbshipit-source-id: d4f59d88fe2125d924bfb85521fa43898ea5ce35
This commit is contained in:
Ariel Mashraki
2019-10-31 06:29:45 -07:00
committed by Facebook Github Bot
parent a9d787edf7
commit 559f163abe
3 changed files with 29 additions and 1 deletions

View File

@@ -36,6 +36,28 @@ func main() {
}
```
**PostgreSQL**
```go
package main
import (
"log"
"<project>/ent"
_ "github.com/lib/pq"
)
func main() {
client, err := ent.Open("postgres","host=<host> port=<port> user=<user> dbname=<database> password=<pass>")
if err != nil {
log.Fatal(err)
}
defer client.Close()
}
```
**SQLite**
```go

View File

@@ -8,6 +8,12 @@ title: Supported Dialects
MySQL supports all the features that are mentioned in the [Migration](migrate.md) section,
and it's being tested constantly on the following 3 versions: `5.6.35`, `5.7.26` and `8`.
## PostgreSQL
PostgreSQL supports all the features that are mentioned in the [Migration](migrate.md) section,
and it's being tested constantly on the following 3 versions: `10`, `11` and `12`.
## SQLite
SQLite was developed only for testing, and it does not support the incremental updates for tables.