Skip to content

SQL literal - #176

Merged
mbostock merged 18 commits into
mainfrom
toph/sql
Aug 13, 2026
Merged

SQL literal#176
mbostock merged 18 commits into
mainfrom
toph/sql

Conversation

@tophtucker

@tophtucker tophtucker commented Jul 10, 2026

Copy link
Copy Markdown
Member

https://linear.app/observable/issue/DEV-1662/sql-fragments

To do

  • Manually test
  • Remove ! assertions
  • Combine ident and getIquote
  • Think about interaction with DatabaseClient

@Fil
Fil self-requested a review July 13, 2026 18:16
Comment thread src/runtime/stdlib/sql.ts Outdated
Comment thread src/runtime/stdlib/index.ts
Comment thread src/runtime/stdlib/databaseClient.ts Outdated
Comment thread src/runtime/stdlib/sql.ts Outdated
Comment thread src/runtime/stdlib/sql.test.ts
Comment thread src/runtime/index.ts Outdated
Comment thread src/runtime/stdlib/databaseClient.ts Outdated
return (await response.json().then(revive)) as QueryResult<T>;
}
async cachePath(strings: readonly string[], ...params: QueryParam[]): Promise<string> {
return `.observable/cache/${await nameHash(this.name)}-${await hash(strings, ...params)}.json`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return `.observable/cache/${await nameHash(this.name)}-${await hash(strings, ...params)}.json`;
return `.observable/cache/${await nameHash(this.name)}-${await hash(strings, ...params)}.arrow`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw should we Promise.all these two awaits?

Comment thread src/runtime/stdlib/databaseClient.ts
@mbostock
mbostock marked this pull request as ready for review August 13, 2026 11:58
@mbostock
mbostock merged commit f21d111 into main Aug 13, 2026
1 check passed
@mbostock
mbostock deleted the toph/sql branch August 13, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants