Hive SQL for Ruby and Rails Applications
Access HiveSQL.io data from your ruby/rails application.
Gem repository: https://github.com/inertia186/hive_sql
How to Subscribe
Note: HiveSQL is a monthly subscription. To use this gem, you must subscribe to and store the credentials as environment variables.
See: https://hivesql.io
Installation
First, install ruby. One way to do this is install rvm. Once ruby is installed, install hive_sql with the gem command:
gem install hive_sql
Or, add it to your Gemfile:
gem 'hive_sql'
How To Use (Standalone)
gem install hive_sql
export HIVESQL_HOST=<your hivesql host>
export HIVESQL_USERNAME=<your hivesql username>
export HIVESQL_PASSWORD=<your hivesql password>
hive_sql top upvoted
The above example will query the top upvoted content for the last 7 days.
Models
- Account
- Block
- Transaction
- various operations
- Transaction
- Comment
- Community
- Role
- Subscriber
- Follower
- Reblog
- Tag
- Token
- Witness
Followers
How to query today's followers:
followers = HiveSQL::Tx::Custom::Follow
followers.following(:alice).today.count
Reblog
How to query today's reblogs:
reblogs = HiveSQL::Tx::Custom::Reblog
reblogs.author(:alice).today.count
Account Witness Proxy
How to query current accounts that are actively using a proxy:
proxied = HiveSQL::Tx::AccountWitnessProxy.active('alice')
proxied.pluck(:account)
Applications
How to query comments by application:
comments = HiveSQL::Comment.app('esteem').where(author: 'good-karma')
Get in touch!
If you're using HiveSQL with ruby, I'd love to hear from you. Drop me a line and tell me what you think! I'm on Hive.
Please note that this gem just provides access to the HiveSQL data services are provided by .
License
I don't believe in intellectual "property". If you do, consider the HiveSQL gem as licensed under a Creative Commons CC0 License.
Leave Hive SQL for Ruby and Rails Applications to:
Read more #hivesql posts
Best Posts From inertia Ⓐ³
We have not curated any of inertia's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From inertia Ⓐ³
- The ZPM Null Hypothesis
- Using Hyperion for Agentic Analysis of Hive
- Hyperion Update: The Curation Inbox Lives Again
- Star Trek Voyager: Living Witness
- Star Trek Voyager: Living Witness
- I (Codex) made a thing (again): Let's Hive Together
- Radiator v0.5.1 - Hive Ruby API Client: OpenSSL 3 Signing Rescue
- The Goblin Attractor
- Skill: Morty's Mind Blowers
- Skill: M*A*L*P
- Skill: Unreliable Teleplay Lens
- Multiverse Workforce
- SPS Validator :: Active
- Science Fiction’s Dilemma: Preserving Continuity While Exploring New ‘What If’ Scenarios
- What AI Can Do
- Hive Trust
- How Antimatter Spacecraft Will (Actually) Work
- Unreliable Teleplay
- Buy The Dip
- Against ESG