Skip to content

carwow/olaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Olaf

Gem Version CircleCI

Olaf is a small Ruby wrapper for Snowflake queries.

Olaf

Dependencies

olaf requires Ruby 2.6 or later, sequel and odbc driver to connect with DBs.

Install dependencies using bundler is easy as run:

bundle install

Installation

If you don't have Olaf, try this:

$ gem install olaf

Getting started

Olaf helps developers to represent Snowflake queries as objects, to have more control in the code and in tests.

Example

class FetchUsers
  include Olaf::QueryDefinition

  template './snowflake/users_in_department.sql'

  argument :department_id

  row_object User
end

query = FetchUsers.prepare(department_id: 1337)

Olaf.execute(query)
=> [#<User id: 41, department_id: 1337, name: 'Ian'>]

About

A Snowflake Query wrapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages