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

Add run button for sql #779

Merged
merged 12 commits into from
Jan 13, 2025
Merged

Add run button for sql #779

merged 12 commits into from
Jan 13, 2025

Conversation

tarasglek
Copy link
Owner

Much easier to use chatcraft for sql now

Copy link

cloudflare-workers-and-pages bot commented Jan 13, 2025

Deploying chatcraft-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: b653bef
Status: ✅  Deploy successful!
Preview URL: https://22166beb.console-overthinker-dev.pages.dev
Branch Preview URL: https://taras-run-sql-ts.console-overthinker-dev.pages.dev

View logs

@tarasglek
Copy link
Owner Author

@humphd wdyt?

@humphd
Copy link
Collaborator

humphd commented Jan 13, 2025

This is good. One thing I hit testing this is that the code that tries to print the output often errors. It would be good to expect errors, handle null or empty results, etc.

For example, I run this:

CREATE TABLE users (
  id INT PRIMARY KEY,
  name VARCHAR(255) NOT NULL,
  email VARCHAR(255) UNIQUE NOT NULL
);

I get this:

TypeError: Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at VQe (https://44d31704.console-overthinker-dev.pages.dev/assets/index-DamZJWA6.js:563:67390)
    at aB (https://44d31704.console-overthinker-dev.pages.dev/assets/index-DamZJWA6.js:571:103)
    at async kJe (https://44d31704.console-overthinker-dev.pages.dev/assets/index-DamZJWA6.js:595:1939)
    at async https://44d31704.console-overthinker-dev.pages.dev/assets/index-DamZJWA6.js:667:1354

@tarasglek
Copy link
Owner Author

@humphd is there really no way to convince vite to not obfuscate our opensource code... this makes me wanna quit js every time

@tarasglek
Copy link
Owner Author

good news is that i fixed your bug, thanks for the report

@tarasglek tarasglek merged commit e58c35d into main Jan 13, 2025
4 checks passed
@humphd
Copy link
Collaborator

humphd commented Jan 13, 2025

We should add sourcemaps

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.

2 participants