0.10.1 • Published 4 years ago

sheet-json-persister v0.10.1

Weekly downloads
3
License
MIT
Repository
gitlab
Last release
4 years ago

SheetJsonPersister Library

About

This is a library which provides persister to a Sequelize db conection for Json events representing worksheet rows

The library will create the DB schema and persist all events to the db connection.

The events are expected to conform this the following schema.

{
    table: 'Sheet Name',//A work sheet name
    schema: {
        'Column A': '[bigint],
        'Column B': '[real]
        'Column C': '[string]
    }
    rows: [{ //A row from the work sheet
        'Column A': 1,
        'Column B': 2.2,
        'Column C': 'test
    }]
}

Install

npm install SheetJsonPersister
yarn install SheetJsonPersister

How to use

import { SheetJsonPersister} from 'sheet-json-persister'
let event = { 
    table: 'Sheet1',
    schema: {
        'Column A': '[bigint],
        'Column B': '[real]
        'Column C': '[string]
    },
    rows: [{ 'Column A': 1, 'Column B': 1.1, 'Column C': 'test1', 'Column D': 1,'Column E': '1.1'  }]
}
let persister = SheetJsonPersister(sequelize)
await persister(event)

See the SheetJsonPersister unit test in the test directory for usage.

0.10.1

4 years ago

0.10.0

5 years ago

0.9.12

5 years ago

0.9.11

5 years ago

0.9.10

5 years ago

0.9.9

5 years ago

0.9.8

5 years ago

0.9.7

5 years ago

0.9.6

5 years ago

0.9.5

5 years ago

0.9.4

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.16

5 years ago

0.2.15

5 years ago

0.2.14

5 years ago

0.2.13

5 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.0

5 years ago