From bc762ebc010906a4ee08b592461d06c209484614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Matczuk?= Date: Fri, 30 Oct 2020 15:06:36 +0100 Subject: [PATCH] table: Add SelectAll --- table/table.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/table/table.go b/table/table.go index e275bac..0c708e8 100644 --- a/table/table.go +++ b/table/table.go @@ -130,6 +130,11 @@ func (t *Table) SelectBuilder(columns ...string) *qb.SelectBuilder { return qb.Select(t.metadata.Name).Columns(columns...).Where(t.partKeyCmp...) } +// SelectAll returns select * statement. +func (t *Table) SelectAll() (stmt string, names []string) { + return qb.Select(t.metadata.Name).ToCql() +} + // Insert returns insert all columns statement. func (t *Table) Insert() (stmt string, names []string) { return t.insert.stmt, t.insert.names