Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 1.2% on proxy.golang.org
Top 0.1% dependent packages on proxy.golang.org
Top 0.2% dependent repos on proxy.golang.org
Top 2.3% forks on proxy.golang.org
Top 0.1% docker downloads on proxy.golang.org

proxy.golang.org : xorm.io/xorm

Package xorm is a simple and powerful ORM for Go. Make sure you have installed Go 1.11+ and then: Firstly, we should create an engine for a database Method NewEngine's parameters are the same as sql.Open which depend drivers' implementation. Generally, one engine for an application is enough. You can define it as a package variable. XORM supports raw SQL execution: 1. query with a SQL string, the returned results is []map[string][]byte 2. query with a SQL string, the returned results is []map[string]string 3. query with a SQL string, the returned results is []map[string]interface{} 4. execute with a SQL string, the returned results There are 8 major ORM methods and many helpful methods to use to operate database. 1. Insert one or multiple records to database 2. Query one record or one variable 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 Rows or 5. Update one or more records 6. Delete one or more records, Delete MUST has condition 7. Count records 8. Sum records The above 8 methods could use with condition methods chainable. Notice: the above 8 methods should be the last chainable method. 1. ID, In 2. Where, And, Or 3. OrderBy, Asc, Desc 4. Limit, Top 5. SQL, let you custom SQL 6. Cols, Omit, Distinct 7. Join, GroupBy, Having xorm could work with xorm.io/builder directly. 1. With Where 2. With In 3. With Join 4. With SetExprs 5. With SQL 6. With Query 7. With Exec More usage, please visit http://xorm.io/docs

Registry - Source - Documentation - JSON
purl: pkg:golang/xorm.io/xorm
License: BSD-3-Clause
Latest release: 4 months ago
First release: about 3 years ago
Namespace: xorm.io
Dependent packages: 975
Dependent repositories: 1,104
Stars: 291 on Gitea.com
Forks: 145 on Gitea.com
Docker dependents: 299
Docker downloads: 826,379,838
See more repository details: repos.ecosyste.ms
Last synced: 7 days ago

    Loading...
    Readme
    Loading...