Ecosyste.ms: Packages

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

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/go-Xorm/xorm

Package xorm is a simple and powerful ORM for Go. Make sure you have installed Go 1.6+ 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 for an application is enough. You can set it as package variable. XORM also support raw SQL execution: 1. query a SQL string, the returned results is []map[string][]byte 2. execute 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 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. Attention: 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 More usage, please visit http://xorm.io/docs

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/go-%21xorm/xorm
Keywords: golang, mssql, mysql, orm, postgres, postgresql, sqlite, tidb
License: BSD-3-Clause
Latest release: over 4 years ago
First release: 10 months ago
Namespace: github.com/go-Xorm
Stars: 6,612 on GitHub
Forks: 775 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 2 days ago

    Loading...
    Readme
    Loading...