Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TABJS-10] Support smart SQL batching for import from SQL files #89

Open
dtbuchholz opened this issue Nov 21, 2023 · 0 comments
Open

[TABJS-10] Support smart SQL batching for import from SQL files #89

dtbuchholz opened this issue Nov 21, 2023 · 0 comments
Labels
cli Created by Linear-GitHub Sync Improvement Created by Linear-GitHub Sync

Comments

@dtbuchholz
Copy link
Contributor

Is your feature request related to a problem? Please describe.

  • Writing many SQL statements from the command line right now is cumbersome, it would be great if we had a flag or other way to simply ingest SQL statements and push these to tableland
  • Once we do support multiple statements at once, we'll need to have a nice way to batch and break these statements up into the right size for sending to the smart contract.
  • Additionally, we should normalize the input statements so that they are more likely to succeed, using our custom parser

Describe the solution you'd like

Something like a --sql flag to would take a local SQL file, and normalize the statements, put them into appropriate sized batches, and then wait for confirmation to send.

Describe alternatives you've considered

Not waiting for confirmation would be ok too, but this feels safer for users. Ideally, you could actually use local files, or remote files, and the cli would just do the right thing.

--

original issue: here

Note: this is partially implemented. But, the smart batching logic isn't in place. If you write a large number of SQL queries, it'll error:

statement size error: larger than specified max
Error: statement size error: larger than specified max

From SyncLinear.com | TABJS-10

@dtbuchholz dtbuchholz added cli Created by Linear-GitHub Sync Improvement Created by Linear-GitHub Sync labels Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Created by Linear-GitHub Sync Improvement Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

1 participant