Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ystyle authored Aug 10, 2021
1 parent 7aaaffc commit c2cec56
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![GoDoc](https://godoc.org/github.com/ystyle/sqlmanager?status.svg)](https://godoc.org/github.com/ystyle/sqlmanager)
---
### sqlmanager
a library for manager sql with markdown like [beetsql](http://ibeetl.com/)
a library for manager sql with markdown or constant field. and you can custom sql store plugin.

**Not A Go ORM Library**

Expand Down Expand Up @@ -50,6 +50,20 @@ func main() {
}
fmt.Println(sql)
// select * from student where id = 1

// using gorm
// db, err := gorm.Open("databaseurl")
// if err != nil {
// panic("failed to connect database")
// }
// db.Raw(sql)

// using database/sql
// db, err := sql.Open("driver-name", "database=test1")
// if err != nil {
// log.Fatal(err)
// }
// db.Query(sql)
}
```

Expand Down

0 comments on commit c2cec56

Please sign in to comment.