{"modulePath":"github.com/cppfuns/go-admin","version":"v0.0.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package connections\n\n## Variables\n\n```go\nvar SqlPool = sync.Pool{\n\tNew: func() interface{} {\n\t\treturn \u0026Sql{\n\t\t\tfields:    make([]string, 0),\n\t\t\ttable:     \"\",\n\t\t\targs:      make([]interface{}, 0),\n\t\t\twheres:    make([]Where, 0),\n\t\t\tleftjoins: make([]Join, 0),\n\t\t\tupdateRaw: make([]RawUpdate, 0),\n\t\t\twhereRaw:  \"\",\n\t\t}\n\t},\n}\n```\n\n## Functions\n\n```go\nfunc RecycleSql(sql *Sql)\n```\n\n## Types\n\n```go\ntype Connection interface {\n\tQuery(query string, args ...interface{}) ([]map[string]interface{}, *sql.Rows)\n\tExec(query string, args ...interface{}) sql.Result\n\tInitDB(cfg map[string]config.Database)\n}\n```\n\n```go\nfunc GetConnection() Connection\n```\n\n```go\nfunc GetConnectionByDriver(driver string) Connection\n```\n\n```go\ntype H map[string]interface{}\n```\n\n```go\ntype Join struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype RawUpdate struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype Sql struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc Table(table string) *Sql\n```\n\n```go\nfunc (sql *Sql) All() ([]map[string]interface{}, error)\n```\n\n```go\nfunc (sql *Sql) Count() (int64, error)\n```\n\n```go\nfunc (sql *Sql) Exec() (int64, error)\n```\n\n```go\nfunc (sql *Sql) Find(arg interface{}) (map[string]interface{}, error)\n```\n\n```go\nfunc (sql *Sql) First() (map[string]interface{}, error)\n```\n\n```go\nfunc (sql *Sql) Insert(values H) (int64, error)\n```\n\n```go\nfunc (sql *Sql) LeftJoin(table string, fieldA string, operation string, fieldB string) *Sql\n```\n\n```go\nfunc (sql *Sql) OrderBy(filed string, order string) *Sql\n```\n\n```go\nfunc (sql *Sql) Select(fields ...string) *Sql\n```\n\n```go\nfunc (sql *Sql) Skip(offset int) *Sql\n```\n\n```go\nfunc (sql *Sql) Take(take int) *Sql\n```\n\n```go\nfunc (sql *Sql) Update(values H) (int64, error)\n```\n\n```go\nfunc (sql *Sql) UpdateRaw(raw string, args ...interface{}) *Sql\n```\n\n```go\nfunc (sql *Sql) Where(field string, operation string, arg interface{}) *Sql\n```\n\n```go\nfunc (sql *Sql) WhereIn(field string, arg []interface{}) *Sql\n```\n\n```go\nfunc (sql *Sql) WhereNotIn(field string, arg []interface{}) *Sql\n```\n\n```go\nfunc (sql *Sql) WhereRaw(raw string) *Sql\n```\n\n```go\ntype Where struct {\n\t// contains filtered or unexported fields\n}\n```\n\n","path":"github.com/cppfuns/go-admin/modules/connections","name":"connections","synopsis":"","isRedistributable":true}
