From 7b6b254a064fb6f7dee0902552d68395c367e19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20F=C3=B8lstad?= Date: Sun, 13 Dec 2020 13:59:43 +0100 Subject: [PATCH] Update readme --- README.md | 8 ++++++-- .../btviewer/components/SyntaxHighlightingUtil.java | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f1d39bc..86c723a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Bigtable viewer is an application that lets you query the contents of Google Big ## Installation Download and run the [installer](https://github.com/erikmafo/BigtableViewer/releases/latest) -for your operating system +for your operating system. ## Basic Usage @@ -41,7 +41,7 @@ SELECT * FROM 'table-0' WHERE myFamily.myStringColumn = 'foo' LIMIT 1000 ``` Use 'AND' to combine filters: ```sql -SELECT * FROM 'table-0' WHERE KEY LIKE 'rowkey' AND myFamily.myStringColumn = 'foo' LIMIT 1000 +SELECT * FROM 'table-0' WHERE KEY LIKE 'rowkey.*' AND myFamily.myStringColumn = 'foo' LIMIT 1000 ``` Only select data from a specific column family: ```sql @@ -51,6 +51,10 @@ or a list of columns: ```sql SELECT myFamily.column1, myFamily.column2 FROM 'table-0' LIMIT 1000 ``` +Filter data based on the cell timestamp: +```sql +SELECT * FROM 'table-0' WHERE TIMESTAMP < '2020-12-13 12:54' LIMIT 1000 +``` To work with reverse row keys, use the built-in REVERSE function: ```sql SELECT * FROM 'table-0' WHERE KEY LIKE REVERSE('yekwor') LIMIT 1000 diff --git a/src/main/java/com/erikmafo/btviewer/components/SyntaxHighlightingUtil.java b/src/main/java/com/erikmafo/btviewer/components/SyntaxHighlightingUtil.java index c2ed32a..b35e800 100644 --- a/src/main/java/com/erikmafo/btviewer/components/SyntaxHighlightingUtil.java +++ b/src/main/java/com/erikmafo/btviewer/components/SyntaxHighlightingUtil.java @@ -75,6 +75,7 @@ private static String getStyleClass(SqlToken token) { case "FROM": case "LIMIT": case "KEY": + case "TIMESTAMP": return KEYWORD_STYLE_CLASS; case "AND": return OPERATOR_STYLE_CLASS;