@shaxpir/squilt 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +133 -0
  3. package/dist/ast/Abstractions.d.ts +14 -0
  4. package/dist/ast/Abstractions.js +11 -0
  5. package/dist/ast/Alias.d.ts +11 -0
  6. package/dist/ast/Alias.js +23 -0
  7. package/dist/ast/BinaryExpression.d.ts +13 -0
  8. package/dist/ast/BinaryExpression.js +26 -0
  9. package/dist/ast/CaseExpression.d.ts +14 -0
  10. package/dist/ast/CaseExpression.js +22 -0
  11. package/dist/ast/Column.d.ts +17 -0
  12. package/dist/ast/Column.js +38 -0
  13. package/dist/ast/Concat.d.ts +8 -0
  14. package/dist/ast/Concat.js +19 -0
  15. package/dist/ast/ExistsExpression.d.ts +9 -0
  16. package/dist/ast/ExistsExpression.js +18 -0
  17. package/dist/ast/From.d.ts +33 -0
  18. package/dist/ast/From.js +60 -0
  19. package/dist/ast/FunctionExpression.d.ts +13 -0
  20. package/dist/ast/FunctionExpression.js +27 -0
  21. package/dist/ast/FunctionName.d.ts +1 -0
  22. package/dist/ast/FunctionName.js +3 -0
  23. package/dist/ast/InExpression.d.ts +13 -0
  24. package/dist/ast/InExpression.js +35 -0
  25. package/dist/ast/InsertQuery.d.ts +17 -0
  26. package/dist/ast/InsertQuery.js +42 -0
  27. package/dist/ast/Join.d.ts +21 -0
  28. package/dist/ast/Join.js +37 -0
  29. package/dist/ast/Literals.d.ts +31 -0
  30. package/dist/ast/Literals.js +65 -0
  31. package/dist/ast/Operator.d.ts +18 -0
  32. package/dist/ast/Operator.js +23 -0
  33. package/dist/ast/OrderBy.d.ts +14 -0
  34. package/dist/ast/OrderBy.js +25 -0
  35. package/dist/ast/SelectQuery.d.ts +39 -0
  36. package/dist/ast/SelectQuery.js +109 -0
  37. package/dist/ast/UnaryExpression.d.ts +11 -0
  38. package/dist/ast/UnaryExpression.js +22 -0
  39. package/dist/ast/With.d.ts +11 -0
  40. package/dist/ast/With.js +21 -0
  41. package/dist/builder/QueryBuilder.d.ts +8 -0
  42. package/dist/builder/QueryBuilder.js +20 -0
  43. package/dist/builder/Shorthand.d.ts +77 -0
  44. package/dist/builder/Shorthand.js +375 -0
  45. package/dist/index.d.ts +32 -0
  46. package/dist/index.js +133 -0
  47. package/dist/renderer/CompactQueryRenderer.d.ts +45 -0
  48. package/dist/renderer/CompactQueryRenderer.js +192 -0
  49. package/dist/renderer/IndentedQueryRenderer.d.ts +51 -0
  50. package/dist/renderer/IndentedQueryRenderer.js +230 -0
  51. package/dist/renderer/QueryRenderer.d.ts +8 -0
  52. package/dist/renderer/QueryRenderer.js +77 -0
  53. package/dist/validate/CommonQueryValidator.d.ts +50 -0
  54. package/dist/validate/CommonQueryValidator.js +262 -0
  55. package/dist/validate/QueryValidator.d.ts +6 -0
  56. package/dist/validate/QueryValidator.js +3 -0
  57. package/dist/validate/SQLiteQueryValidator.d.ts +27 -0
  58. package/dist/validate/SQLiteQueryValidator.js +96 -0
  59. package/dist/visitor/ParamCollector.d.ts +46 -0
  60. package/dist/visitor/ParamCollector.js +129 -0
  61. package/dist/visitor/QueryIdentityTransformer.d.ts +45 -0
  62. package/dist/visitor/QueryIdentityTransformer.js +173 -0
  63. package/dist/visitor/QueryParamRewriteTransformer.d.ts +11 -0
  64. package/dist/visitor/QueryParamRewriteTransformer.js +26 -0
  65. package/dist/visitor/SqlTreeNodeTransformer.d.ts +5 -0
  66. package/dist/visitor/SqlTreeNodeTransformer.js +3 -0
  67. package/dist/visitor/SqlTreeNodeVisitor.d.ts +45 -0
  68. package/dist/visitor/SqlTreeNodeVisitor.js +47 -0
  69. package/package.json +36 -0
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@shaxpir/squilt",
3
+ "version": "1.0.0",
4
+ "description": "A lightweight, zero-dependency TypeScript library for building SQL queries through a fluent AST API",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "test": "jest",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "keywords": [
16
+ "sql",
17
+ "query",
18
+ "builder",
19
+ "sqlite",
20
+ "ast",
21
+ "typescript"
22
+ ],
23
+ "author": "Benji Smith",
24
+ "license": "Apache-2.0",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/shaxpir/squilt.git"
28
+ },
29
+ "devDependencies": {
30
+ "@types/jest": "^29.5.14",
31
+ "@types/node": "^22.10.2",
32
+ "jest": "^29.7.0",
33
+ "ts-jest": "^29.2.5",
34
+ "typescript": "^5.7.2"
35
+ }
36
+ }