vlado / activerecord-cte Goto Github PK
View Code? Open in Web Editor NEWBrings Common Table Expressions support to ActiveRecord and makes it super easy to build and chain complex CTE queries
License: MIT License
Brings Common Table Expressions support to ActiveRecord and makes it super easy to build and chain complex CTE queries
License: MIT License
I'm receiving a wrong number of arguments error running 0.1.5 with ActiveRecord 6.1.4. I'm happy to provide more information to assist.
activerecord (6.1.4) lib/active_record/relation/query_methods.rb:1136:in `build_arel'
activerecord-cte (0.1.5) lib/activerecord/cte/core_ext.rb:50:in `build_arel'
activerecord (6.1.4) lib/active_record/relation/query_methods.rb:1059:in `arel'
activerecord (6.1.4) lib/active_record/relation/calculations.rb:200:in `block in pluck'
activerecord (6.1.4) lib/active_record/relation.rb:861:in `skip_query_cache_if_necessary'
activerecord (6.1.4) lib/active_record/relation/calculations.rb:196:in `pluck'
activerecord (6.1.4) lib/active_record/schema_migration.rb:46:in `all_versions'
activerecord (6.1.4) lib/active_record/migration.rb:1109:in `get_all_versions'
activerecord (6.1.4) lib/active_record/migration.rb:1121:in `needs_migration?'
activerecord (6.1.4) lib/active_record/migration.rb:625:in `check_pending!'
activerecord (6.1.4) lib/active_record/migration.rb:590:in `block (2 levels) in call'
activesupport (6.1.4) lib/active_support/evented_file_update_checker.rb:59:in `execute'
activerecord (6.1.4) lib/active_record/migration.rb:595:in `block in call'
activerecord (6.1.4) lib/active_record/migration.rb:587:in `synchronize'
activerecord (6.1.4) lib/active_record/migration.rb:587:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.1.4) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (6.1.4) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
better_errors (2.9.1) lib/better_errors/middleware.rb:62:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
web-console (4.1.0) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.1.0) lib/web_console/middleware.rb:19:in `block in call'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `catch'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
lograge (0.11.2) lib/lograge/rails_ext/rack/logger.rb:15:in `call_app'
railties (6.1.4) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.1.4) lib/active_support/tagged_logging.rb:99:in `block in tagged'
activesupport (6.1.4) lib/active_support/tagged_logging.rb:37:in `tagged'
activesupport (6.1.4) lib/active_support/tagged_logging.rb:99:in `tagged'
railties (6.1.4) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.0) lib/request_store/middleware.rb:19:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (6.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
sentry-ruby-core (4.6.1) lib/sentry/rack/capture_exceptions.rb:23:in `block in call'
sentry-ruby-core (4.6.1) lib/sentry/hub.rb:56:in `with_scope'
sentry-ruby-core (4.6.1) lib/sentry-ruby.rb:168:in `with_scope'
sentry-ruby-core (4.6.1) lib/sentry/rack/capture_exceptions.rb:14:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/static.rb:24:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/static.rb:24:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/host_authorization.rb:98:in `call'
webpacker (5.4.0) lib/webpacker/dev_server_proxy.rb:25:in `perform_request'
rack-proxy (0.7.0) lib/rack/proxy.rb:63:in `call'
railties (6.1.4) lib/rails/engine.rb:539:in `call'
puma (5.3.2) lib/puma/configuration.rb:249:in `call'
puma (5.3.2) lib/puma/request.rb:77:in `block in handle_request'
puma (5.3.2) lib/puma/thread_pool.rb:338:in `with_force_shutdown'
puma (5.3.2) lib/puma/request.rb:76:in `handle_request'
puma (5.3.2) lib/puma/server.rb:438:in `process_client'
puma (5.3.2) lib/puma/thread_pool.rb:145:in `block in spawn_thread'
I've just starting to play with the gem today. So this may be a dumb question.
In Postgres (not sure without googling about others) you can instruct the planner on building intermediate output tables with AS [NOT ]MATERIALIZED
[1]?
If its not there now but you would like it to be and can suggest an API I'd be take a crack at a PR
Hi,
First off - thanks a ton for writing this and fighting to get most of it into ActiveRecord!
The "issue" in this report is that there is not a roadmap-y mention in the README on how this is going to play with 7.1. When 7.1. releases, is it expected that this gem will work, or do we need to pull the gem out when it releases?
I am particularly interested as we need recursive CTEs, and I was hoping we could use this gem and that post-7.1, it would remain with just the recursive stuff added to base activerecord.
Thanks again for the great work here!
Hi there,
I was testing out the library with Ruby 3.0.1 and Rails 6.1.4, and seem to be getting the wrong result when trying out the example query from the documentation. Here's the toy app I was testing with; am I missing something?
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.