Releases: topxeq/xxsql
Releases · topxeq/xxsql
v0.0.7 - Bug Fixes and Improvements
Bug Fixes
- IN operator parsing: Fixed parsing of value lists like
IN (1, 2, 3) - NOT IN operator parsing: Fixed parsing of
NOT INexpressions - LIMIT/OFFSET clause: Fixed LIMIT and OFFSET not being applied in SELECT queries
- DISTINCT deduplication: Fixed DISTINCT keyword not removing duplicate rows
- UNIQUE constraint: Fixed UNIQUE constraint not being checked during UPDATE operations
- Temp table writes: Fixed temp table write failures by creating temp data files
New Features
- Date functions: Added DAYNAME, MONTHNAME, YEARWEEK, TO_DAYS, FROM_DAYS, STR_TO_DATE
- SetDataFile method: Added method for Table struct to support temp table data files
Documentation
- Updated README with new features
- Updated REFERENCE.md with new function documentation
- Added TESTING.md with testing guidelines
Test Results
All executor tests passing: ok github.com/topxeq/xxsql/internal/executor 2.899s
🤖 Generated with Claude Code
v0.0.6 - XxScript-based UDF Support
What's New
XxScript-based User Defined Functions
This release replaces the weak SQL-expression-based UDF system with XxScript, enabling more powerful and flexible user-defined functions.
New Syntax
Dollar-quoted string (PostgreSQL style):
CREATE FUNCTION add_nums(x, y) RETURNS INT AS $$
return x + y
$$SCRIPT keyword:
CREATE FUNCTION double(x) RETURNS INT SCRIPT 'return x * 2'Features
- Support for complex script logic including conditionals and loops
- SQL queries inside functions using
db_query()anddb_exec() - Both old-style SQL UDFs and new XxScript UDFs coexist
- Persistence support for script functions
- Backward compatible with existing SQL UDF syntax
Documentation Updates
- Added comprehensive REST API Reference (docs/API.md)
- Updated README with links to XxScript Reference and API documentation
- All API endpoints now documented with request/response examples
Bug Fixes
- Fixed LIKE operator to work correctly with VARCHAR comparisons
- Fixed CREATE OR REPLACE FUNCTION parsing for script-based functions
Documentation
| Document | Description |
|---|---|
| Reference Manual | SQL syntax, data types, functions |
| REST API Reference | Complete REST API documentation |
| XxScript Reference | Scripting language guide |
| Microservices Guide | HTTP endpoints and projects |
| Maintenance Manual | Installation and administration |
Binaries
| Platform | Server (xxsqls) | Client (xxsqlc) |
|---|---|---|
| Linux AMD64 | xxsqls-linux-amd64 | xxsqlc-linux-amd64 |
| Linux ARM64 | xxsqls-linux-arm64 | xxsqlc-linux-arm64 |
| Darwin AMD64 | xxsqls-darwin-amd64 | xxsqlc-darwin-amd64 |
| Darwin ARM64 | xxsqls-darwin-arm64 | xxsqlc-darwin-arm64 |
| Windows AMD64 | xxsqls-windows-amd64.exe | xxsqlc-windows-amd64.exe |
v0.0.5 - XxScript Microservices & Full-Text Search
New Features
XxScript - Scripting Language for Microservices
- New procedural scripting language for building HTTP endpoints
- HTTP object for request/response handling (
http.json(),http.param(), etc.) - Database object for queries (
db.query(),db.exec()) - Built-in functions: string, math, array, JSON, date/time
- Try/catch error handling with
throw - User-defined functions with recursion support
- Microservice endpoints via
/ms/<table>/<skey>
Full-Text Search (FTS)
CREATE FTS INDEXfor full-text indexingMATCHoperator for full-text queries- Persistent FTS indexes with auto-save
Query Optimizer
- Automatic index scan selection
- Cost-based query optimization
EXPLAINshows execution plan details
SQL Enhancements
VACUUMcommand for database maintenancePRAGMAcommands for runtime configurationCOLLATEfor string comparison and sorting- Transaction isolation levels (DEFERRED, IMMEDIATE, EXCLUSIVE)
TEMP/TEMPORARYtables for session-scoped dataVIEW CHECK OPTIONfor updatable views- Composite foreign keys and primary keys
LIKE ESCAPEclause supportGLOBpattern matching (SQLite compatible)
JSON Functions
json(),jsonParse()for JSON handling- JSONPath expressions:
jsonExtract(),jsonQuery() - Array/object manipulation functions
Date/Time Functions
now(),formatTime(),parseTime()- Date arithmetic and formatting
Bug Fixes
- Fixed VARCHAR primary key equality comparison
- Fixed GLOB pattern matching for SQLite compatibility
- Fixed FTS MATCH expression evaluation
- Fixed CTE column name aliases
- Fixed RANK as both window function and FTS expression
Documentation
- Added XxScript reference documentation (
docs/xxscript.md)
Full Changelog: v0.0.4...v0.0.5
v0.0.4
Full Changelog: v0.0.3...v0.0.4
XxSql v0.0.2 - Bugfix Release
XxSql v0.0.2 - Bugfix Release
This release fixes an important bug in ORDER BY handling.
Bugfixes
ORDER BY for Simple SELECT Statements
- Fixed ORDER BY not working for simple SELECT statements (was only working with JOIN queries)
- Now supports
ORDER BY column_name ASC/DESC - Now supports
ORDER BYwith numeric column reference (e.g.,ORDER BY 1)
Example
-- Sort by score ascending
SELECT * FROM scores ORDER BY score ASC;
-- Sort by score descending
SELECT * FROM scores ORDER BY score DESC;
-- Sort using numeric column reference
SELECT * FROM scores ORDER BY 3 DESC;Installation
# Download from GitHub Releases
curl -LO https://github.com/topxeq/xxsql/releases/download/v0.0.2/xxsql-v0.0.2-linux-amd64.tar.gz
tar xzf xxsql-v0.0.2-linux-amd64.tar.gzAvailable Downloads
| Platform | Architecture | File |
|---|---|---|
| Linux | amd64 | xxsql-v0.0.2-linux-amd64.tar.gz |
| Linux | arm64 | xxsql-v0.0.2-linux-arm64.tar.gz |
| macOS | amd64 | xxsql-v0.0.2-darwin-amd64.tar.gz |
| macOS | arm64 | xxsql-v0.0.2-darwin-arm64.tar.gz |
| Windows | amd64 | xxsql-v0.0.2-windows-amd64.zip |
Test Coverage
Overall: 87.5% average coverage across 29 packages
Documentation
- README.md - Full documentation
- CONTRIBUTING.md - Contribution guidelines
XxSql v0.0.1 - Initial Release
XxSql v0.0.1 - Initial Release
A MySQL-compatible SQL database server written in Go.
Features
SQL Support
- SELECT, INSERT, UPDATE, DELETE statements
- CREATE TABLE, DROP TABLE, ALTER TABLE
- CREATE INDEX, DROP INDEX
- Aggregate functions: COUNT, SUM, AVG, MIN, MAX
- WHERE clause with comparison operators
- JOIN operations (INNER, LEFT, RIGHT, CROSS)
- UNION queries
- ORDER BY, GROUP BY, LIMIT, OFFSET
Storage Engine
- B+tree based indexing
- WAL (Write-Ahead Logging) for recovery
- Buffer pool management
- Checkpoint support
- Multi-granularity locking
Server
- MySQL-compatible protocol (port 3306 by default)
- Private protocol support
- HTTP API interface with web management UI
- Authentication and authorization
- TLS/SSL support
Client CLI
- Interactive REPL
- Tab completion for SQL keywords
- Multiple output formats (table, JSON, TSV, vertical)
- Command history
Recent Fixes
ORDER BY Support
- Fixed ORDER BY for simple SELECT statements (was only working with JOINs)
- Supports ORDER BY column_name ASC/DESC
- Supports ORDER BY with numeric column reference (e.g., ORDER BY 1)
Test Coverage
Overall: 87.5% average coverage across 29 packages
| Top Packages | Coverage |
|---|---|
| pkg/errors | 98.0% |
| storage/page | 100.0% |
| config | 96.7% |
| auth | 93.9% |
| storage/catalog | 90.5% |
- 44+ integration tests for client-server communication
- Comprehensive unit tests for all core components
Installation
# Download from GitHub Releases
# Linux amd64
curl -LO https://github.com/topxeq/xxsql/releases/download/v0.0.1/xxsql-v0.0.1-linux-amd64.tar.gz
tar xzf xxsql-v0.0.1-linux-amd64.tar.gz
# Or build from source
git clone https://github.com/topxeq/xxsql.git
cd xxsql
go build -o xxsqls ./cmd/xxsqls
go build -o xxsqlc ./cmd/xxsqlcQuick Start
# Start server
./xxsqls -data-dir ./data -mysql-port 3306
# Connect with CLI client
./xxsqlc -host localhost -port 3306
# Or use MySQL client
mysql -h 127.0.0.1 -P 3306 -u admin -pAvailable Downloads
| Platform | Architecture | File |
|---|---|---|
| Linux | amd64 | xxsql-v0.0.1-linux-amd64.tar.gz |
| Linux | arm64 | xxsql-v0.0.1-linux-arm64.tar.gz |
| macOS | amd64 | xxsql-v0.0.1-darwin-amd64.tar.gz |
| macOS | arm64 | xxsql-v0.0.1-darwin-arm64.tar.gz |
| Windows | amd64 | xxsql-v0.0.1-windows-amd64.zip |
Documentation
- README.md - Full documentation
- CONTRIBUTING.md - Contribution guidelines
- docs/TESTING.md - Testing guide