Skip to main content

2 posts tagged with "release-note"

View All Tags

Β· 6 min read
Taehoon Moon

🌊 Breaking Changes​

πŸ€ Python Support​

Code Samples​

from gluesql import Glue, MemoryStorage
from tabulate import tabulate

db = Glue(MemoryStorage())

sql = """
SELECT
u.name as user,
d.name as device
FROM User u
JOIN Device d ON u.id = d.userId
""".strip().replace(
" ", ""
)

result = db.query(sql)
rows = result[0].get("rows")
print(f"\n[Query]\n{sql}")
print(tabulate(rows, headers="keys", showindex=True, tablefmt="simple_outline"))

πŸ€ Redis Storage​

πŸ€ CSV Storage​

πŸ€ More operators and functions​

πŸš€ Features​

  • feat: implement select iterator utility function @ever0de (#1429)

🌟 Improvements​

  • Fix parsing of BigDecimal literals with zero fraction part as floats, not integer @zmrdltl (#1416)
  • Update docs/ast-builder padding.md code block lang keyword, @panarch (#1436)
  • Support StoreMut trait to Optional @seonghun-dev (#1435)
  • docs: write docmentation for padding @devgony (#1434)
  • test: add test cases for astb-padding @devgony (#1433)
  • Upgrade to chrono v0.4.31 and adjust millisecond value in Timestamp Creation @zmrdltl (#1427)
  • Remove unnecessary comments in evalaute/function.rs @panarch (#1431)
  • write docmentation for character_conversion @devgony (#1428)
  • docs: Add SLICE function doc @fregataa (#1425)
  • test: add cases to character_conversion @devgony (#1424)
  • docs:Add doc about SPLICE function @jinlee0 (#1423)
  • Change store RowIter type from Iterator to Stream @panarch (#1419)
  • Reflect Deprecation of from_utc in Crate chrono @zmrdltl (#1415)
  • Remove eval_to_{int|float..} macro uses in core/../evaluate/function.rs, @panarch (#1361)
  • test: write example for ast builder @daengdaengLee (#1259)
  • Fix merge conflict in data/value/mod.rs @panarch (#1406)
  • chore: implement ConvertError, @ever0de (#1401)
  • refactor: remove implementation of from Value trait for Evaluated @tgsong827 (#1399)
  • refactor: update function module's namespacing in ast_builder @tgsong827 (#1398)
  • chore: remove Result from ast_builder::transaction return type @ever0de (#1404)
  • chore: bump rust version to 1.72 @ever0de (#1388)
  • chore: add example of convert from payload to custom struct @ever0de (#1379)
  • Update Chrono version to 0.4.26, @panarch (#1374)
  • Update test-suite Tester::run to return Payload, @panarch (#1373)
  • Remove .unwrap() uses in test-suite/ test codes, @panarch (#1372)
  • Replace run!, test! and count! macros in test-suite to Tester methods, @panarch (#1368)
  • Update coverage.yml gh-action to ignore await only lines, @panarch (#1370)
  • Apply pretty_assertions::assert_eq! to core/ ast_builder unit tests @panarch (#1369)
  • Simplify value evaluate cmp with literal @panarch (#1353)
  • Update gh-action author assign - add zmrdltl to reviewers @panarch (#1342)
  • Refactor GCD and LCM functions @cake-monotone (#1331)
  • Refactor write_rows @devgony (#1319)
  • Js pkg wasm pack build not to generate readme and packagejson @panarch (#1327)
  • Update pkg/javascript dist directories to use dist_web/ and dist_node… @panarch (#1326)
  • Upgrade bigdecimal to 0.4.1, sqlparser to 0.36.1 @jinlee0 (#1322)
  • Update wasm-pack-action version to 0.4.0, @panarch (#1316)
  • Update JavaScript package load_indexeddb method to get namespace as a… @panarch (#1320)
  • Upgrade sqlparser-rs version to 0.35, @panarch (#1292)
  • Remove unused error variant in JsonStorage @panarch (#1278)
  • Implement CAST text literal or value to MAP or LIST, @panarch (#1267)
  • Simplity JsonStorage Store::fetch_all_schemas codes, @panarch (#1264)
  • Change console.log in gluesql.js -> console.debug @parkma99 (#1256)
  • Replace actions-rs/toolchain with dtolnay/rust-toolchain @jongwooo (#1251)
  • ci: Automatically assign a PR to its author @rapsealk (#1253)
  • Remove sync methods in core/ Glue struct, @panarch (#1247)
  • Remove test function in test-suite tester, @panarch (#1246)
  • fix: allow interval cast-related functions to accept only literals instead of evaluations @ever0de (#1238)
  • Split custom Partial{Eq|Ord} impl of Value \& Literal into evaluate_{eq|cmp} @panarch (#1233)
  • Improve example codes formatting @jopemachine (#1235)
  • feat: fmt list and map @Mehrbod2002 (#1226)
  • Update README.md - add blog article links @panarch (#1232)
  • Write the blog article - revolutionizing databases by unifying the qu… @panarch (#1231)
  • Write the blog article - test driven documentation @panarch (#1229)
  • Write the blog article - breaking the boundary between sql and nosql … @panarch (#1228)
  • Add test and doc for ast-builder::statements::querying::data-aggregation @devgony (#1224)

πŸ› Bug Fixes​

  • fix: Literal comparison with BinaryOperator @ding-co (#1397)
  • fix: update Key.cmp to compare a type with other type @tgsong827 (#1367)
  • Fix Value::evaluate_cmp_with_literal between Decimal and Literal::Num… @panarch (#1352)
  • Fix spool on tabular off and SelectMap @devgony (#1314)
  • Update auto-assign-action to be triggered on PR open from fork repos @panarch (#1313)
  • Fix Scala Subquery should contain only 1 column @ChobobDev (#1284)
  • Wrap config path by quotes in auto-author-assign.yml @panarch (#1258)
  • Apply word-wrap to docs/ article h1 @panarch (#1230)
  • Fix docusaurus.config.js themeConfig handler @panarch (#1225)

πŸ‘ New Contributors​

Full Changelog: https://github.com/gluesql/gluesql/compare/v0.14.0...v0.15.0

Β· 11 min read
Taehoon Moon

We now provide an official documentation website at https://gluesql.org/docs

πŸš€ Features​

πŸ€ Schemaless data support​

GlueSQL now supports creating tables without a schema, allowing for both structured and unstructured data to be stored in the same table. To create a schemaless table, simply run CREATE TABLE without specifying any columns. For more information on querying schemaless data, please refer to the following link: querying schemaless data

CREATE TABLE Bar;

To insert values,

INSERT INTO Bar VALUES
('{ "name": "ast", "value": 30 }'),
('{ "name": "glue", "rate": 3.0, "list": [1, 2, 3] }'),

Then, selecting values from schemaless table is simple.

SELECT name, rate, list[0] FROM Bar WHERE name = 'glue';

e.g.

CREATE TABLE Names (id INTEGER, name TEXT);
INSERT INTO Names VALUES (1, 'glue'), (2, 'sql');

CREATE TABLE Logs;
INSERT INTO Logs VALUES
('{ "id": 1, "value": 30 }'),
('{ "id": 2, "rate": 3.0, "list": [1, 2, 3] }'),
('{ "id": 3, "rate": 5.0, "value": 100 }');

SELECT * FROM Names JOIN Logs ON Names.id = Logs.id;
/*
| id | list | name | rate | value |
|----|---------|------|------|-------|
| 1 | | glue | | 30 |
| 2 |[1, 2, 3]| sql | 3 | |
*/

πŸ€ IndexedDB & WebStorage supports in JavaScript package​

GlueSQL supports handling in-memory, localStorage, sessionStorage, and even IndexedDB using the same SQL syntax. All you need to know is how to specify the ENGINE when creating a table.

e.g.

CREATE TABLE Mem (mid INTEGER) ENGINE = memory;
CREATE TABLE Loc (lid INTEGER) ENGINE = localStorage;
CREATE TABLE Ses (sid INTEGER) ENGINE = sessionStorage;
CREATE TABLE Idb (iid INTEGER) ENGINE = indexedDB;

SELECT
mid, lid, sid, iid
FROM Mem
JOIN Loc
JOIN Ses
JOIN Idb;

πŸ€ Data Types - UINT32, UINT64, UINT128, POINT and FLOAT32​

πŸ€ Functions - APPEND, PREPEND, RAND, FIND_IDX, INITCAP and CALC_DISTANCE​

πŸ€ Store traits​

User-level custom function​

By implementing both the CustomFunction and CustomFunctionMut traits, users can create, use, and delete user-level custom functions. Although GlueSQL plans to continuously add various functions, users may still find them insufficient. In such cases, users can create their own user-level custom functions to supplement the built-in functions. Additionally, if there are repetitive business logic codes, they can be stored as custom functions. e.g.

CREATE FUNCTION ADD_ONE (n INT, x INT DEFAULT 1) RETURN n + x;

SELECT ADD_ONE(10) AS test;

DROP FUNCTION ADD_ONE;

Metadata​

The Metadata trait is an optional implementation for providing additional metadata support in GlueSQL. GlueSQL does not enforce any specific metadata implementation, allowing custom storage developers to decide which type of metadata, such as create time, modify time, etc., they want to provide.

πŸ€ Storages​

JSON Storage​

Composite Storage​

  • Add CompositeStorage which bundles multiple storages @panarch (#1068)

IndexedDB Storage​

Web Storage​

  • Add WebStorage - support localStorage \& sessionStorage for web browsers @panarch (#1050)

πŸ€ Other new features​

🌊 Interface Changes​

  • Remove Store trait related cfg features, @panarch (#1091)
  • Refactor CreateTable.columns from Vec<ColumnDef> to Option<Vec<ColumnDef>> @devgony (#1086)
  • Remove MutResult @panarch (#1073)
  • Update all store mut trait methods to take \&mut self @panarch (#1072)
  • Change StoreMut interface to use \&mut self, not to take ownership @panarch (#1071)
  • Modify default ColumnOption from NOT NULL to NULL @devgony (#997)

🌟 Improvements​

🌳 Documentation​

We now provide an official documentation website at https://gluesql.org/docs

Docs - setup​

πŸ“‹ Tests​

πŸ› Bug Fixes​

  • Fix docusaurus pages/index broken link @panarch (#1214)
  • Fix docs/ Discord GlueSQL channel invite link address @panarch (#1213)
  • Fix InvalidJsonString error message replacing payload to fileName @devgony (#1185)
  • Fix TryFrom Value::Str to u128 not to use parse_uuid @ChobobDev (#1134)
  • Fix column alias with identifer for TableFactor::Derived @ding-young (#1119)
  • Pass data even when deleted_by is not present @ever0de (#1117)
  • Fix MemoryStorage \& WebStorage primary key support @panarch (#1115)
  • Fix plan::validate to handle CTAS and ITAS adding unit test @devgony (#1074)
  • Fix test-suite tester functions to show (found, expected) shape @panarch (#1028)