Code Monkey home page Code Monkey logo

pg_array_parser's Introduction

PgArrayParser

Build Status Code Climate

Fast PostreSQL array parsing.

Installation

Add this line to your application's Gemfile:

gem 'pg_array_parser'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pg_array_parser

Usage

Include the PgArrayParser module, which provides the parse_pg_array method.

class MyPostgresParser
  include PgArrayParser
end

parser = MyPostgresParser.new
parser.parse_pg_array '{}'
# => []
parser.parse_pg_array '{1,2,3,4}'
# => ["1", "2", "3", "4"]
parser.parse_pg_array '{1,{2,3},4}'
# => ["1", ["2", "3"], "4"]
parser.parse_pg_array '{some,strings that,"May have some ,\'s"}'
# => ["some", "strings that", "May have some ,'s"]

Authors

Dan McClain twitter

Versioning

This gem follows Semantic Versioning

Want to help?

Stable branches are created based upon each minor version. Please make pull requests to specific branches rather than master.

Please make sure you include tests!

Unles Rails drops support for Ruby 1.8.7 we will continue to use the hash-rocket syntax. Please respect this.

Don't use tabs to indent, two spaces are the standard.

Legal

DockYard, LLC © 2012

@dockyard

Licensed under the MIT license

pg_array_parser's People

Contributors

jeremyevans avatar mauricio avatar bcardarella avatar jasiek avatar tychobrailleur avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.