{"id":43737,"library":"qustar","title":"Qustar","description":"Qustar is a TypeScript SQL query builder that composes queries through an array-like API with map, filter, and orderBy methods. Version 0.0.52 is in early active development with support for PostgreSQL, SQLite, MySQL, and MariaDB via separate connector packages. It generates 100% SQL via codegen-free expression evaluation, avoiding ORM-like magic. Key differentiators: no code generation, no migrations or transactions yet, and native operator overloading is not supported, requiring explicit method calls like .add(), .eq() for expressions.","status":"active","version":"0.0.52","language":"javascript","source_language":"en","source_url":"https://github.com/tilyupo/qustar","tags":["javascript","sql","typescript","db","query","orm"],"install":[{"cmd":"npm install qustar","lang":"bash","label":"npm"},{"cmd":"yarn add qustar","lang":"bash","label":"yarn"},{"cmd":"pnpm add qustar","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for PostgreSQL connectivity; similar connectors exist for other databases","package":"qustar-pg","optional":true},{"reason":"Recommended connector for SQLite","package":"qustar-better-sqlite3","optional":true}],"imports":[{"note":"Q is a default export-like named export. CommonJS require is not supported; use ES import.","wrong":"const qustar = require('qustar');","symbol":"Q","correct":"import { Q } from 'qustar'"},{"note":"Connector classes are in separate packages (qustar-pg, qustar-better-sqlite3, etc.), not in qustar core.","wrong":"import { PgConnector } from 'qustar'","symbol":"PgConnector","correct":"import { PgConnector } from 'qustar-pg'"},{"note":"table() requires an object with name and schema; passing a string is invalid.","wrong":"const users = Q.table('users')","symbol":"Q.table","correct":"const users = Q.table({ name: 'users', schema: { id: Q.i32() } })"}],"quickstart":{"code":"import { PgConnector } from 'qustar-pg';\nimport { Q } from 'qustar';\n\nconst users = Q.table({\n  name: 'users',\n  schema: {\n    id: Q.i32(),\n    firstName: Q.string(),\n    lastName: Q.string(),\n    age: Q.i32().null(),\n  },\n});\n\nconst query = users\n  .orderByDesc(user => user.createdAt)\n  .map(user => ({\n    name: user.firstName.concat(' ', user.lastName),\n    age: user.age,\n  }))\n  .limit(3);\n\nconst connector = new PgConnector(process.env.DATABASE_URL ?? '');\n\nconst result = await query.fetch(connector);\nconsole.log('users:', result);","lang":"typescript","description":"Create a table schema, build a query with orderBy, map, and limit, then fetch from PostgreSQL."},"warnings":[{"fix":"Replace e.g. user.age + 1 with user.age.add(1).","message":"Native JavaScript operators (+, -, ===) cannot be used; use methods like .add(), .sub(), .eq() instead.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Pin to exact version or expect breaking changes.","message":"Version 0.0.52 is pre-release; API may change without notice.","severity":"deprecated","affected_versions":"<1.0.0"},{"fix":"Install a connector like qustar-pg and import from it.","message":"Connector packages are required; qustar core alone cannot execute queries.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Always provide full table definition object.","message":"table() must receive an object with 'name' and 'schema'; passing a string or omitting schema throws runtime error.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'0.0.52':25 '100':45 'activ':29 'add':80 'api':17 'array':15 'array-lik':14 'avoid':53 'builder':8 'call':78 'code':61 'codegen':49 'codegen-fre':48 'compos':10 'connector':41 'db':87 'develop':30 'differenti':59 'earli':28 'eq':81 'evalu':52 'explicit':76 'express':51,83 'filter':20 'free':50 'generat':44,62 'javascript':84 'key':58 'like':16,56,79 'magic':57 'map':19 'mariadb':38 'method':23,77 'migrat':64 'mysql':36 'nativ':69 'oper':70 'orderbi':22 'orm':55,89 'orm-lik':54 'overload':71 'packag':42 'postgresql':34 'queri':7,11,88 'qustar':1,2 'requir':75 'separ':40 'sql':6,46,85 'sqlite':35 'support':32,74 'transact':66 'typescript':5,86 'version':24 'via':39,47 'yet':67","created_at":"2026-06-05T17:01:14.269718+00:00","updated_at":"2026-06-05T17:01:14.269718+00:00","problems":[{"fix":"Run: npm install qustar-pg","cause":"Missing installation of connector package.","error":"Cannot find module 'qustar-pg' or its corresponding type declarations."},{"fix":"Replace 'user.age + 1' with 'user.age.add(1)'.","cause":"Using native operators instead of qustar expression methods.","error":"Property 'add' does not exist on type 'number'."},{"fix":"Use: import { Q } from 'qustar';","cause":"Importing incorrectly (e.g., using CommonJS or wrong symbol).","error":"Q.table is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/tilyupo/qustar#readme","github":"https://github.com/tilyupo/qustar","docs":null,"changelog":null,"pypi":null,"npm":"qustar","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}