From 51cc4c07b2a2b6345b1496baac865f5faf955e7d Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Fri, 20 Jan 2017 00:52:56 +0000 Subject: Switch from database/sql to sqlx --- vendor/github.com/jmoiron/sqlx/reflectx/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vendor/github.com/jmoiron/sqlx/reflectx/README.md (limited to 'vendor/github.com/jmoiron/sqlx/reflectx/README.md') diff --git a/vendor/github.com/jmoiron/sqlx/reflectx/README.md b/vendor/github.com/jmoiron/sqlx/reflectx/README.md new file mode 100644 index 0000000..f01d3d1 --- /dev/null +++ b/vendor/github.com/jmoiron/sqlx/reflectx/README.md @@ -0,0 +1,17 @@ +# reflectx + +The sqlx package has special reflect needs. In particular, it needs to: + +* be able to map a name to a field +* understand embedded structs +* understand mapping names to fields by a particular tag +* user specified name -> field mapping functions + +These behaviors mimic the behaviors by the standard library marshallers and also the +behavior of standard Go accessors. + +The first two are amply taken care of by `Reflect.Value.FieldByName`, and the third is +addressed by `Reflect.Value.FieldByNameFunc`, but these don't quite understand struct +tags in the ways that are vital to most marshallers, and they are slow. + +This reflectx package extends reflect to achieve these goals. -- cgit v1.2.3