I hope this doesn't work with DELETE queries.
Instant SQL for results as you type in DuckDB UI
21–30 of 124 posts
Re: Instant SQL for results as you type in DuckDB UI
#22I'm assuming it's more of a user preference like commas in front of the field instead of after field?
Re: Instant SQL for results as you type in DuckDB UI
#23Will this be available in duckdb -ui ? Is mother duck editor features available on-prem? My understanding is that mother duck is a data warehouse sass.
It is already available in the local DuckDB UI! Let us know what you think! -Customer software engineer at MotherDuck
Re: Instant SQL for results as you type in DuckDB UI
#24a fun function in duckdb (which I think they're using here) is `json_serialize_sql`. It returns a JSON AST of the SQL SELECT json_serialize_sql('SELECT 2'); [ { "json_serialize_sql('SELECT 2')": { "error": false, "statements": [ { "node": { "type": "SELECT_NODE", "modifiers": [], "cte_map": { "map": [] }, "select_list": [ { "class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 7, "value": { "t…
Re: Instant SQL for results as you type in DuckDB UI
#25First time seeing the from at the top of the query and I am not sure how I feel about it. It seems useful but I am so used to select...from. I'm assuming it's more of a user preference like commas in front of the field instead of after field?
Re: Instant SQL for results as you type in DuckDB UI
#26Delete From dbo.users w... (129304 rows affected)
The blog specifically says that they're getting the SQL AST so presumably they would not execute something like a DELETE.
Re: Instant SQL for results as you type in DuckDB UI
#27CTE inspection is amazing. I spend too much time doing that manually.
Re: Instant SQL for results as you type in DuckDB UI
#28Re: Instant SQL for results as you type in DuckDB UI
#29This is such a bizarre feature.
Re: Instant SQL for results as you type in DuckDB UI
#30First time seeing the from at the top of the query and I am not sure how I feel about it. It seems useful but I am so used to select...from. I'm assuming it's more of a user preference like commas in front of the field instead of after field?
SQL is a declarative language. The ordering of the statements was carefully thought through.
I will say it's harmless though, the clauses don't have any dependency in terms of meaning so it's fine to just allow them to be reordered in terms of the meaning of the query, but that's true of lots and lots of things in programming and just having a convention is usually better than allowing anything.
For example, you could totally allow this to be legal:
def
for x in whatever:
print(x)
print_whatever(whatever):
There's nothing ambiguous about it, but why? Like if you are used to seeing it one way it just makes it more confusing to read, and if you aren't used to seeing it the normal way you should at least somewhat master something before you try to improve it through cosmetic tweaks.I think you see this all the time, people try to impose their own comfort onto things for no actual improvement.