# sdql

> A Node.js module to query and analyze SDQL query

Latest version **1.0.3** (published 2017-06-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install sdql
pnpm add sdql
yarn add sdql
bun add sdql
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-06-08 |
| First published | 2017-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | sydneyhenrard |
| Keywords | sdql |

## Links

- npm: https://www.npmjs.com/package/sdql
- Repository: https://github.com/sydneyhenrard/sdql
- Homepage: https://github.com/sydneyhenrard/sdql#readme
- Issues: https://github.com/sydneyhenrard/sdql/issues
- npm.io page: https://npm.io/package/sdql

## Dependencies (3)

- [request](https://npm.io/package/request.md) ^2.81.0
- [simple-statistics](https://npm.io/package/simple-statistics.md) ^3.0.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.3

## Recent versions

- 1.0.3 (latest) — 2017-06-08
- 1.0.2 — 2017-06-04
- 1.0.0 — 2017-04-26

## README

# SDQL [![Build Status](https://travis-ci.org/sydneyhenrard/sdql.svg?branch=master)](https://travis-ci.org/sydneyhenrard/sdql) [![Coverage Status](https://coveralls.io/repos/github/sydneyhenrard/sdql/badge.svg)](https://coveralls.io/github/sydneyhenrard/sdql)

A Node.js module to query and analyze SDQL query

## Installation

```
npm install sdql --save
```

## Usage

The sample program checks the performance of betting on home underdog in the NFL breakdowned by season:

```javascript
var SdqlService = require('./SdqlService');

let sdqlService = new SdqlService();
let breakdown = 'season';
sdqlService.run('HD', 'NFL', breakdown)
.then(system => {
	return sdqlService.analyze(system, 'ON', false, breakdown);
})
.then(analysis => {
	console.log(analysis)
});
```

The `analyze` method parameters:

`system`: data returned by the `run` method call

`type`:
 - `ON`: Follow the system
 - `AGAINST`: Fade the system
 - `OVER`: Play on the over
 - `UNDER`: Play on the under

`includePicks`: include all the picks in the analysis

`breakdown`: breakdown the picks by that parameter. For instance setting the parameter to `season` will return the performance by season.
Note that you have to specify the breakdown in both the `run` and `analysis`
 methods.
 
### Options

By default the odds is -110, but you can override the odd. It's useful to compare the performance of a query with a lower juice (-105).

```javascript
sdqlService.analyze(system, 'ON', false, breakdown, {value: -105, type: 'US'});
```

## Tests

```
npm test
```

---
_Source: https://npm.io/package/sdql · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
