{"modulePath":"github.com/windhooked/pkg","version":"v0.0.0-20210530195812-02de94908f4f","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\npackage main generates Go structs, slices and function receivers from SQL tables.\n\nTODO: Analyze SQL code generation tools TODO: [https://github.com/knq/xo](https://github.com/knq/xo) TODO: [https://bitbucket.org/jatone/genieql](https://bitbucket.org/jatone/genieql)\n\n## Constants\n\n```go\nconst MethodRecvPrefix = \"parent\"\n```\n\n```go\nconst TypePrefix = \"Table\"\n```\nTypePrefix of the generated types e.g. TableStoreSlice, TableStore ... If you change this you must change all \"Table\" in the template.\n\n## Functions\n\n```go\nfunc Connect(opts ...dbr.ConnPoolOption) (*dbr.ConnPool, error)\n```\nConnect creates a new database connection from a DSN stored in an environment variable CS\\_DSN.\n\n## Types\n\n```go\ntype OneTable struct {\n\tPackage          string\n\tTick             string\n\tName             string\n\tTableName        string // original table name\n\tStruct           string\n\tSlice            string\n\tTable            string\n\tGoColumns        codegen.Columns\n\tColumns          csdb.Columns\n\tMethodRecvPrefix string\n\tFindByPk         string\n}\n```\n\n```go\nfunc NewOneTable(db *sql.DB, mageVersion int, pkgName, table string) OneTable\n```\n\n","path":"github.com/windhooked/pkg/_codegen/tableToStruct","name":"main","synopsis":"package main generates Go structs, slices and function receivers from SQL tables.","isRedistributable":true}
