rooq 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4d18ea600bbe40b40c491f3c5de3adaa128b6257dded972baeb83a8f435ac73e
4
+ data.tar.gz: 316d291beb5ce21df8a01901ddb0b7fca3b04431633870562c8e943e09e4337d
5
+ SHA512:
6
+ metadata.gz: a3619d7cfd1bcc88e3d37f73162608f32d6bbd06d9eb4660e73eea2f80ea7d55a41d10e56100ea8eb171443ec76099a21c99c7d8e7e0b5e7a80a607dd5d737ee
7
+ data.tar.gz: 579fdd76242ad6f6e855834e0632de174afa5fca046edc69e3d02bafe182f5313f553b4b92664b44bd614c3c2da11f9a8a7e4909f0c570b138a9b5a342c1ff22
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 4.0.1
data/.yardopts ADDED
@@ -0,0 +1,10 @@
1
+ --title "rOOQ Documentation"
2
+ --main README.md
3
+ --markup markdown
4
+ --plugin yard-sorbet
5
+ lib/**/*.rb
6
+ -
7
+ README.md
8
+ USAGE.md
9
+ CHANGELOG.md
10
+ LICENSE
data/CHANGELOG.md ADDED
@@ -0,0 +1,33 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.0] - 2025-01-21
11
+
12
+ ### Added
13
+
14
+ - Initial release
15
+ - Fluent query builder for SELECT, INSERT, UPDATE, DELETE
16
+ - PostgreSQL dialect with parameterized queries
17
+ - Schema introspection and code generation
18
+ - CLI tool (`rooq generate`) for generating table definitions
19
+ - Optional Sorbet type annotations
20
+ - Connection management with ConnectionProvider abstraction
21
+ - Context API for query execution (similar to jOOQ's DSLContext)
22
+ - PostgreSQL connection pool adapter
23
+ - Result wrapper with symbol keys and automatic type coercion
24
+ - Parameter conversion for Time, Date, Hash, Array types
25
+ - Advanced SQL features:
26
+ - JOINs (INNER, LEFT, RIGHT, FULL, CROSS)
27
+ - GROUP BY with HAVING
28
+ - Window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.)
29
+ - Common Table Expressions (CTEs)
30
+ - Set operations (UNION, INTERSECT, EXCEPT)
31
+ - CASE WHEN expressions
32
+ - Aggregate functions
33
+ - Grouping sets (CUBE, ROLLUP)
data/CLAUDE.md ADDED
@@ -0,0 +1,54 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Setup
6
+
7
+ This is a Ruby project using Ruby 4.0.1 (managed via asdf/.tool-versions).
8
+
9
+ ## Development Approach
10
+
11
+ - **Strict TDD**: Write tests first, then implement code to make them pass
12
+ - **Grey-box testing**: Unit tests have knowledge of internal structure while testing through public interfaces
13
+ - **Commit discipline**: Only commit after all tests pass. Commit every small, coherent change immediately after tests are green
14
+
15
+ ## Commands
16
+
17
+ ```bash
18
+ # Install dependencies
19
+ bundle install
20
+
21
+ # Run all tests
22
+ bundle exec rake test
23
+
24
+ # Run a single test file
25
+ bundle exec ruby -Ilib:test test/path/to/file_test.rb
26
+
27
+ # Run a specific test by name
28
+ bundle exec ruby -Ilib:test test/path/to/file_test.rb -n test_method_name
29
+ ```
30
+
31
+ ## Testing
32
+
33
+ Uses minitest and minicrest gems.
34
+
35
+ ### Test Style Requirements
36
+
37
+ - **Use `assert_that` exclusively**: Always use minicrest's `assert_that` with matchers, never plain minitest assertions
38
+ - **Descriptive test names**: Use comments to group related tests and descriptive method names
39
+
40
+ ```ruby
41
+ class BookTest < Minitest::Test
42
+ # initialization
43
+
44
+ def test_stores_title
45
+ book = Book.new(title: "Ruby")
46
+ assert_that(book.title).equals("Ruby")
47
+ end
48
+
49
+ def test_validates_presence_of_title
50
+ error = assert_raises(ValidationError) { Book.new(title: nil) }
51
+ assert_that(error.message).matches_pattern(/title is required/)
52
+ end
53
+ end
54
+ ```
data/Gemfile ADDED
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "pg", "~> 1.5"
6
+
7
+ gem "sorbet-runtime", "~> 0.5"
8
+
9
+ group :development, :test do
10
+ gem "minitest", "~> 5.27"
11
+ gem "minicrest", "~> 1.0"
12
+ gem "rake", "~> 13.0"
13
+ gem "sorbet", "~> 0.5"
14
+ gem "tapioca", "~> 0.16"
15
+ gem "rdoc", "~> 6.10"
16
+ gem "redcarpet", "~> 3.6"
17
+ gem "webrick", "~> 1.9"
18
+ gem "yard", "~> 0.9"
19
+ gem "yard-sorbet", "~> 0.9"
20
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,116 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ benchmark (0.5.0)
5
+ date (3.5.1)
6
+ erb (6.0.1)
7
+ erubi (1.13.1)
8
+ logger (1.7.0)
9
+ minicrest (1.0.21)
10
+ minitest (~> 5.0)
11
+ minitest (5.27.0)
12
+ netrc (0.11.0)
13
+ parallel (1.27.0)
14
+ pg (1.6.3)
15
+ pg (1.6.3-arm64-darwin)
16
+ prism (1.8.0)
17
+ psych (5.3.1)
18
+ date
19
+ stringio
20
+ rake (13.3.1)
21
+ rbi (0.3.9)
22
+ prism (~> 1.0)
23
+ rbs (>= 3.4.4)
24
+ rbs (3.10.2)
25
+ logger
26
+ rdoc (6.17.0)
27
+ erb
28
+ psych (>= 4.0.0)
29
+ tsort
30
+ redcarpet (3.6.1)
31
+ rexml (3.4.4)
32
+ sorbet (0.6.12894)
33
+ sorbet-static (= 0.6.12894)
34
+ sorbet-runtime (0.6.12894)
35
+ sorbet-static (0.6.12894-universal-darwin)
36
+ sorbet-static-and-runtime (0.6.12894)
37
+ sorbet (= 0.6.12894)
38
+ sorbet-runtime (= 0.6.12894)
39
+ spoom (1.6.3)
40
+ erubi (>= 1.10.0)
41
+ prism (>= 0.28.0)
42
+ rbi (>= 0.3.3)
43
+ rexml (>= 3.2.6)
44
+ sorbet-static-and-runtime (>= 0.5.10187)
45
+ thor (>= 0.19.2)
46
+ stringio (3.2.0)
47
+ tapioca (0.16.11)
48
+ benchmark
49
+ bundler (>= 2.2.25)
50
+ netrc (>= 0.11.0)
51
+ parallel (>= 1.21.0)
52
+ rbi (~> 0.2)
53
+ sorbet-static-and-runtime (>= 0.5.11087)
54
+ spoom (>= 1.2.0)
55
+ thor (>= 1.2.0)
56
+ yard-sorbet
57
+ thor (1.5.0)
58
+ tsort (0.2.0)
59
+ webrick (1.9.2)
60
+ yard (0.9.38)
61
+ yard-sorbet (0.9.0)
62
+ sorbet-runtime
63
+ yard
64
+
65
+ PLATFORMS
66
+ arm64-darwin-25
67
+
68
+ DEPENDENCIES
69
+ minicrest (~> 1.0)
70
+ minitest (~> 5.27)
71
+ pg (~> 1.5)
72
+ rake (~> 13.0)
73
+ rdoc (~> 6.10)
74
+ redcarpet (~> 3.6)
75
+ sorbet (~> 0.5)
76
+ sorbet-runtime (~> 0.5)
77
+ tapioca (~> 0.16)
78
+ webrick (~> 1.9)
79
+ yard (~> 0.9)
80
+ yard-sorbet (~> 0.9)
81
+
82
+ CHECKSUMS
83
+ benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
84
+ date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
85
+ erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5
86
+ erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
87
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
88
+ minicrest (1.0.21) sha256=3deb7cc3ea42a8b2fd7b5f43eaac8a7b9a4f7505a180be9e918e9883b0a9130c
89
+ minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5
90
+ netrc (0.11.0) sha256=de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f
91
+ parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
92
+ pg (1.6.3) sha256=1388d0563e13d2758c1089e35e973a3249e955c659592d10e5b77c468f628a99
93
+ pg (1.6.3-arm64-darwin) sha256=7240330b572e6355d7c75a7de535edb5dfcbd6295d9c7777df4d9dddfb8c0e5f
94
+ prism (1.8.0) sha256=84453a16ef5530ea62c5f03ec16b52a459575ad4e7b9c2b360fd8ce2c39c1254
95
+ psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
96
+ rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
97
+ rbi (0.3.9) sha256=d6a187bd0b376e999d3d82a5e5798a61178be98b894b7b35741c14162c9ea015
98
+ rbs (3.10.2) sha256=bd8a5dc4c62f229f020146b61844a31f9c79e649449d212904a474eb79c846fc
99
+ rdoc (6.17.0) sha256=0f50d4e568fc98195f9bb155a9e8dff6c7feabfb515fb22ef6df1d12ad5a02b7
100
+ redcarpet (3.6.1) sha256=d444910e6aa55480c6bcdc0cdb057626e8a32c054c29e793fa642ba2f155f445
101
+ rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
102
+ sorbet (0.6.12894) sha256=2b20dfd6170b56591e33e075af0b355e5d20beaef840ce570730a2e9ec6f1aa2
103
+ sorbet-runtime (0.6.12894) sha256=4f0cbe041d80dac973ec3a5a848679922074dd77cc19f46384b27a8b9ff4a90c
104
+ sorbet-static (0.6.12894-universal-darwin) sha256=8ab7b2e8dde70e0936140e02dec6ac499b43131ec293c636a5c49de03bb3c1f1
105
+ sorbet-static-and-runtime (0.6.12894) sha256=09e9a66e869ba36ade3fbd095d11ae9bf38fa2d48151ea67e9d555df6189b9d3
106
+ spoom (1.6.3) sha256=0d05a501a643a2e3cb75357583fcd0a400e92e05cd05a1bf1a08cda6d321d153
107
+ stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
108
+ tapioca (0.16.11) sha256=beeb388a5e2022ef8880cd24f57bc2acb59b65a4d5a6aa59bc1f10bc7b1eb1f7
109
+ thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
110
+ tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
111
+ webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
112
+ yard (0.9.38) sha256=721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f
113
+ yard-sorbet (0.9.0) sha256=03d1aa461b9e9c82b886919a13aa3e09fcf4d1852239d2967ed97e92723ffe21
114
+
115
+ BUNDLED WITH
116
+ 4.0.3