From 9fc0b5f88b7ff6503695db7c57719841105999e0 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 10 Dec 2020 22:31:36 +0300 Subject: [PATCH] store: remove unneded options Signed-off-by: Vasiliy Tolstov --- store/options.go | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/store/options.go b/store/options.go index 434a941b..a9a07048 100644 --- a/store/options.go +++ b/store/options.go @@ -88,15 +88,8 @@ func Table(t string) Option { // ReadOptions configures an individual Read operation type ReadOptions struct { - Database, Table string - // Prefix returns all records that are prefixed with key - Prefix bool - // Suffix returns all records that have the suffix key - Suffix bool - // Limit limits the number of returned records - Limit uint - // Offset when combined with Limit supports pagination - Offset uint + Database string + Table string } // ReadOption sets values in ReadOptions @@ -110,34 +103,6 @@ func ReadFrom(database, table string) ReadOption { } } -// ReadPrefix returns all records that are prefixed with key -func ReadPrefix() ReadOption { - return func(r *ReadOptions) { - r.Prefix = true - } -} - -// ReadSuffix returns all records that have the suffix key -func ReadSuffix() ReadOption { - return func(r *ReadOptions) { - r.Suffix = true - } -} - -// ReadLimit limits the number of responses to l -func ReadLimit(l uint) ReadOption { - return func(r *ReadOptions) { - r.Limit = l - } -} - -// ReadOffset starts returning responses from o. Use in conjunction with Limit for pagination -func ReadOffset(o uint) ReadOption { - return func(r *ReadOptions) { - r.Offset = o - } -} - // WriteOptions configures an individual Write operation // If Expiry and TTL are set TTL takes precedence type WriteOptions struct {