aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/jmoiron/sqlx/reflectx/README.md
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2017-06-17 08:21:57 +0000
committerFelix Hanley <felix@userspace.com.au>2017-06-17 08:21:57 +0000
commit1aa391b256288a264592f9bef03c9f06640937d1 (patch)
treecd0f3aca5ffcccad759c0b6758fd4b9ef916d5a0 /vendor/github.com/jmoiron/sqlx/reflectx/README.md
parent6bd6035f8356e8c374385ea8ec02e042ec46cda5 (diff)
downloaddhtsearch-1aa391b256288a264592f9bef03c9f06640937d1.tar.gz
dhtsearch-1aa391b256288a264592f9bef03c9f06640937d1.tar.bz2
Bundle basic HTTP frontend and add stats
Also start using sqlx package for simpler struct scanning
Diffstat (limited to 'vendor/github.com/jmoiron/sqlx/reflectx/README.md')
-rw-r--r--vendor/github.com/jmoiron/sqlx/reflectx/README.md17
1 files changed, 17 insertions, 0 deletions
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.