mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
all: add postgres to docs
Reviewed By: alexsn Differential Revision: D18245079 fbshipit-source-id: d4f59d88fe2125d924bfb85521fa43898ea5ce35
This commit is contained in:
committed by
Facebook Github Bot
parent
a9d787edf7
commit
559f163abe
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user