From 024859ff45d061b64011b768ecd11424e227439f Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Fri, 27 Dec 2019 17:12:46 -0800 Subject: [PATCH] utils_sql.go: add sqlScanner interface --- api/utils_sql.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 api/utils_sql.go diff --git a/api/utils_sql.go b/api/utils_sql.go new file mode 100644 index 0000000..c75f34d --- /dev/null +++ b/api/utils_sql.go @@ -0,0 +1,11 @@ +package main + +import () + +// scanner is a database/sql abstraction interface that can be used with both +// *sql.Row and *sql.Rows. +type sqlScanner interface { + // Scan copies columns from the underlying query row(s) to the values + // pointed to by dest. + Scan(dest ...interface{}) error +}