gopkg.in/reform.v1 (go): Package reform is a better ORM for Go, based on non-empty interfaces and code generation.  See README (https://github.com/go-reform/reform/blob/main/README.md) for quickstart information.  Querier object, embedded into DB and TX types, contains context which is used by all its methods. It defaults to context.Background() and can be changed with WithContext method:  Methods Exec, Query, and QueryRow use the same context. Methods ExecContext, QueryContext, and QueryRowContext are just compatibility wrappers for Querier.WithContext(ctx).Exec/Query/QuyeryRow to satisfy various standard interfaces.  DB object methods Begin and InTransaction start transaction with the same context. Methods BeginTx and InTransactionContext start transaction with a given context without changing DB's context:  Note that several different contexts can be used:  In theory, ctx1 and ctx2 can be entirely unrelated. Although that construct is occasionally useful, the behavior on context cancelation is entirely driver-defined; some drivers may just close the whole connection, effectively canceling unrelated ctx2 on ctx1 cancelation. For that reason mixing several contexts is not recommended.  reform allows one to add tags (comments) to generated queries with WithTag Querier method. They can be used to track queries from RDBMS logs and tools back to application code. For example, this code:  will generate the following query:  Please keep in mind that dynamic tags can affect RDBMS query cache. Consult your RDBMS documentation for details. Some known links:  This example shows some reform features. It uses https://github.com/AlekSi/pointer to get pointers to values of build-in types.
Keywords: go|golang|hacktoberfest|orm|sql|sql-orm