Top 4.3% forks on proxy.golang.org
proxy.golang.org : github.com/lunny/xorm
Package xorm is a simple and powerful ORM for Go. Make sure you have installed Go 1.1+ and then: Firstly, we should new an engine for a database Method NewEngine's parameters is the same as sql.Open. It depends drivers' implementation. Generally, one engine is enough. You can set it as package variable. Xorm also support raw sql execution: 1. query sql, the returned results is []map[string][]byte 2. exec sql, the returned results There are 7 major ORM methods and many helpful methods to use to operate database. 1. Insert one or multipe records to database 2. Query one record from database 3. Query multiple records from database 4. Query multiple records and record by record handle, there two methods, one is Iterate, another is Raws 5. Update one or more records 6. Delete one or more records 7. Count records The above 7 methods could use with condition methods. 1. Id, In 2. Where, And, Or 3. OrderBy, Asc, Desc 4. Limit, Top 5. Sql 6. Cols, Omit, Distinct 7. Join, GroupBy, Having More usage, please visit https://github.com/lunny/xorm/blob/master/docs/QuickStartEn.md
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/lunny/xorm
License: BSD-3-Clause
Latest release: over 11 years ago
First release: over 11 years ago
Namespace: github.com/lunny
Stars: 26 on GitHub
Forks: 7 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 12 days ago