Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Generating a CSV file with ROM

Generating a CSV file with ROM

Krzysztof Wawer

June 17, 2015
Tweet

More Decks by Krzysztof Wawer

Other Decks in Programming

Transcript

  1. GENERA
    TING
    A CSV FILE
    WITH ROM

    View full-size slide

  2. Krzysztof Wawer
    GITHUB: wafcio
    TWITTER: @KrzysztofWawer
    ABOUT ME

    View full-size slide

  3. RUBY CSV CREATE

    View full-size slide

  4. RUBY CSV CREATE

    View full-size slide

  5. RUBY CSV READ

    View full-size slide

  6. RUBY OBJECT MAPPER

    View full-size slide

  7. ROM
    READ
    CREATE
    UPDATE
    DELETE

    View full-size slide

  8. ROM-CSV
    1. Read data
    2. Create dataset

    View full-size slide

  9. ROM-CSV
    • ROM::Memory::Dataset
    • ROM::ArrayDataset
    (support module)
    • ROM::EnumerableDataset
    (support module)

    View full-size slide

  10. ROM-CSV
    Methods:
    • join
    • project (select)
    • restrict (where)
    • order

    View full-size slide

  11. ROM-CSV
    • Like database
    • Generate CSV report

    View full-size slide

  12. ROM-CSV
    https://github.com/rom-rb/rom-csv/tree/master/examples

    View full-size slide