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

Top 5.8% dependent packages on proxy.golang.org
Top 3.5% dependent repos on proxy.golang.org

proxy.golang.org : github.com/letsencrypt/borp

Package borp provides a simple way to marshal Go structs to and from SQL databases. It uses the database/sql package, and should work with any compliant database/sql driver. Source code, additional documentation, and examples: https://github.com/letsencrypt/borp Borp's Exec, Select*, Query, and QueryRow methods accept placeholder parameters in the query, to be filled from the args parameters to these functions. Borp supports some additional styles for placeholder parameters: For the Exec and Select* methods on DbMap and Transaction, Borp supports named bind parameters. To use named bind parameters, instead of a list of parameters, pass a single `map[string]interface{}` to these functions. And instead of using ? in the query, use placeholder parameters of the form :word. Before running the query, Borp will bind each named placeholder parameter to the corresponding value found by looking up "word" in the map. Example: If you set the ExpandSlices field of DbMap to true, placeholders that bind to slices will be handled specially. Borp will modify the query, adding more placeholders to match the number of entries in the slice. For example, given the scenario bellow: The executed query would be: With the mapper: It is also flexible for custom slice types. The value just need to implement stringer or numberer interfaces.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/letsencrypt/borp
License: MIT
Latest release: almost 2 years ago
First release: almost 2 years ago
Namespace: github.com/letsencrypt
Dependent packages: 1
Dependent repositories: 2
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 3 days ago

    Loading...
    Readme
    Loading...