# gitlab-repo-db

> A database based on gitlab files

Latest version **0.1.5** (published 2020-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install gitlab-repo-db
pnpm add gitlab-repo-db
yarn add gitlab-repo-db
bun add gitlab-repo-db
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2020-12-02 |
| First published | 2020-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 3 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | cyyjs |
| Maintainers | cyyjs |
| Keywords | gitlab, repo, db, mongodb |

## Links

- npm: https://www.npmjs.com/package/gitlab-repo-db
- Repository: https://github.com/cyyjs/gitlab-repo-db
- Issues: https://github.com/cyyjs/gitlab-repo-db/issues
- npm.io page: https://npm.io/package/gitlab-repo-db

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) ^8.3.1
- [mingo](https://npm.io/package/mingo.md) ^3.1.0
- [gitlab-api-v4](https://npm.io/package/gitlab-api-v4.md) ^0.1.3

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.1.5 (latest) — 2020-12-02
- 0.1.4 — 2020-12-02
- 0.1.3 — 2020-12-02
- 0.1.2 — 2020-12-02
- 0.1.1 — 2020-12-01
- 0.1.0 — 2020-12-01

## README

## gitlab-repo-db

基于Gitlab 仓库文件存储的数据库

### 安装

```bash
yarn add gitlab-repo-db
```

### 使用

```js
const DB = new GitlabDB({
  url: 'your gitlab api url',
  projectID: 'repo project id',
  token: 'your gitlab token'
})

// dbName存储文件的路径，支持 a/b/c写法
const dbName = 'test'
const collection = DB.collection(dbName)


const query = {
  a: 1
}

// find all
collection.find(query)

// find one
collection.findOne(query)

// insert one
collection.insert({
  b: 1
})

// insert multiple
collection.insert([{
  b: 1
}, {
  c: 1
}])

// update
const updateData = {
  c: 1
}

const updateOption = {
  multi: true, // default: false
  upsert: true // default: false
} 

collection.update(query, updateData, option)

// remove all
collection.remove(query)
```

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