New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lazy_store

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lazy_store

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Lazy Records for Ruby

This is a port of the java functional library Lazy Records to the ruby language. It still needs a lot of tidy and re-working in several places. But it works and is a first cut.

Summary

  • Tries to be as lazy as possible
  • Supports method chaining
  • Is primarily based on totally lazy

Install

This gem requires ruby 2.x.x

In your bundler Gemfile

 gem lazy_records, '~>0.0.1' 

Or with rubygems

 gem install lazy_records

Examples

The following are some simple examples of the currently implemented functionality.

With MemoryRecords (Run in memory only)

require 'lazy_records'

name = keyword(:name)
age = keyword(:age)
people = definition(:people, name, age)

records = MemoryRecords.new

records.add(people, sequence(
record(name, 'kostas', age, 25),
record(name, 'kings', age, 34)))

records.get(people).count # returns 2
records.get(people).head.name) # returns 'kostas'

with SqlRecords (Run against either mysql or mssql currently)

require 'lazy_records'
require 'adpaters/mysql'

name = keyword(:name)
age = keyword(:age)
people = definition(:people, name, age)

records = SqlRecords.new(Mysql.new(username:'user1',password:'pass1',database:'mydb'))

records.add(people, sequence(
record(name, 'kostas', age, 25),
record(name, 'kings', age, 34)))

records.get(people).count # returns 2
records.get(people).head.name) # returns 'kostas'

FAQs

Package last updated on 03 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc