Skip to content

Conversation

@juarezr
Copy link
Contributor

@juarezr juarezr commented Sep 10, 2025

Add SQL Support to Pastum Extension

✨ New Features

  • 7 SQL Statement Types: SELECT, INSERT, DELETE, CREATE TABLE with multiple variants
  • Smart Data Type Detection: Automatic mapping to appropriate SQL types (VARCHAR, NUMERIC, BOOLEAN, INTEGER)
  • VS Code Integration: New command and configuration options
  • Default Paste Support: Works seamlessly with SQL files

🔧 SQL Statement Types

  • SELECT FROM VALUES - Query with VALUES clause
  • SELECT UNION ALL - CTE-based approach
  • INSERT INTO VALUES - Standard INSERT statements
  • INSERT INTO SELECT VALUES - INSERT with subquery
  • INSERT INTO - Multiple individual INSERTs
  • DELETE WHERE - DELETE with WHERE conditions
  • CREATE TABLE - DDL table creation

⚙️ Configuration

  • New pastum.defaultSqlStatement setting
  • Defaults to "INSERT INTO VALUES"
  • Integrated with existing configuration system

✅ ✅ Testing

  • ✅ All 41 tests passing
  • ✅ Comprehensive test coverage for SQL module
  • ✅ Extension activation tests updated
  • ✅ No syntax or linting errors

✅ ✅ Technical Details

  • Added src/paste-sql.js (220 lines)
  • Updated extension registration
  • Enhanced default paste functionality
  • Version bumped to 0.3.0

@juarezr
Copy link
Contributor Author

juarezr commented Sep 10, 2025

Tested with MySQL, Postgres, and MSSQL.

@juarezr
Copy link
Contributor Author

juarezr commented Sep 10, 2025

Closes #17

@atsyplenkov atsyplenkov self-requested a review September 10, 2025 22:22
@atsyplenkov
Copy link
Owner

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on October 31

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@atsyplenkov atsyplenkov changed the title Add SQL Support to Pastum Extension Add SQL Support Sep 19, 2025
Copy link
Owner

@atsyplenkov atsyplenkov left a comment

Choose a reason for hiding this comment

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

Can you please update the CHANGELOG.md?

@atsyplenkov atsyplenkov merged commit 8264cfd into atsyplenkov:master Sep 20, 2025
2 checks passed
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