summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSQL/AST/Token.h
diff options
context:
space:
mode:
authorMahmoud Mandour <ma.mandourr@gmail.com>2021-12-06 15:30:38 +0200
committerAndreas Kling <kling@serenityos.org>2022-02-05 00:35:03 +0100
commitf6233913ad4deda351530736e659027150a5dd03 (patch)
tree1d5b72c655378c6c1a10f2d1de41df1ef2029965 /Userland/Libraries/LibSQL/AST/Token.h
parentcd4dba87fa52b5a3cad819ccf4161be5a6bd1d8b (diff)
downloadserenity-f6233913ad4deda351530736e659027150a5dd03.zip
LibSQL: Implement a DESCRIBE TABLE statement
This statement (for now) outputs the name and types of the different attributes in a table. It's not standard SQL but all DBMSs that I know of implement a sort of statement for such functionality. Since the output of DESCRIBE TABLE is just a relation, an internal schema, `master` was created and a table definition for DESCRIBE into it. The table definition and the master schema are not accessible by the user.
Diffstat (limited to 'Userland/Libraries/LibSQL/AST/Token.h')
-rw-r--r--Userland/Libraries/LibSQL/AST/Token.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibSQL/AST/Token.h b/Userland/Libraries/LibSQL/AST/Token.h
index 5c58d6f98d..e51e5e8ff7 100644
--- a/Userland/Libraries/LibSQL/AST/Token.h
+++ b/Userland/Libraries/LibSQL/AST/Token.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
* Copyright (c) 2021, Jan de Visser <jan@de-visser.net>
+ * Copyright (c) 2021, Mahmoud Mandour <ma.mandourr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -53,6 +54,7 @@ namespace SQL::AST {
__ENUMERATE_SQL_TOKEN("DEFERRED", Deferred, Keyword) \
__ENUMERATE_SQL_TOKEN("DELETE", Delete, Keyword) \
__ENUMERATE_SQL_TOKEN("DESC", Desc, Keyword) \
+ __ENUMERATE_SQL_TOKEN("DESCRIBE", Describe, Keyword) \
__ENUMERATE_SQL_TOKEN("DETACH", Detach, Keyword) \
__ENUMERATE_SQL_TOKEN("DISTINCT", Distinct, Keyword) \
__ENUMERATE_SQL_TOKEN("DO", Do, Keyword) \