Comparing version 1.0.3 to 1.0.4
import { EnrichModelType, ModelTypeBase, QueryType } from "./util"; | ||
import DiskDB from "."; | ||
export default class Collection<ModelType extends ModelTypeBase> { | ||
export default class Collection<CollectionModelType> { | ||
private db; | ||
@@ -8,7 +8,7 @@ private collectionName; | ||
constructor(db: DiskDB<any>, collectionName: string); | ||
find(query?: QueryType<ModelType>): EnrichModelType<ModelType>[]; | ||
findOne(query?: QueryType<ModelType>): EnrichModelType<ModelType>; | ||
save(data: Omit<ModelType, "_id">): EnrichModelType<ModelType>; | ||
save(data: Omit<ModelType, "_id">[]): EnrichModelType<ModelType>[]; | ||
update(query: QueryType<ModelType>, data: ModelType, options?: { | ||
find(query?: QueryType<CollectionModelType & ModelTypeBase>): EnrichModelType<CollectionModelType & ModelTypeBase>[]; | ||
findOne(query?: QueryType<CollectionModelType & ModelTypeBase>): EnrichModelType<CollectionModelType & ModelTypeBase>; | ||
save(data: Omit<CollectionModelType & ModelTypeBase, "_id">): EnrichModelType<CollectionModelType & ModelTypeBase>; | ||
save(data: Omit<CollectionModelType & ModelTypeBase, "_id">[]): EnrichModelType<CollectionModelType & ModelTypeBase>[]; | ||
update(query: QueryType<CollectionModelType & ModelTypeBase>, data: CollectionModelType & ModelTypeBase, options?: { | ||
multi?: boolean; | ||
@@ -20,4 +20,4 @@ upsert?: boolean; | ||
}; | ||
remove(query?: QueryType<ModelType>, multi?: boolean): boolean; | ||
remove(query?: QueryType<CollectionModelType & ModelTypeBase>, multi?: boolean): boolean; | ||
count(): number; | ||
} |
@@ -19,3 +19,3 @@ "use strict"; | ||
var lodash_1 = require("lodash"); | ||
var uuid_1 = __importDefault(require("uuid")); | ||
var uuid_1 = require("uuid"); | ||
var util_1 = __importDefault(require("./util")); | ||
@@ -59,3 +59,3 @@ var Collection = /** @class */ (function () { | ||
for (var i = data.length - 1; i >= 0; i--) { | ||
var d = __assign(__assign({}, data[i]), { _id: uuid_1.default.v4().replace(/-/g, "") }); | ||
var d = __assign(__assign({}, data[i]), { _id: uuid_1.v4().replace(/-/g, "") }); | ||
collection.push(d); | ||
@@ -67,3 +67,3 @@ retCollection.push(d); | ||
} | ||
var newData = __assign(__assign({}, data), { _id: uuid_1.default.v4().replace(/-/g, "") }); | ||
var newData = __assign(__assign({}, data), { _id: uuid_1.v4().replace(/-/g, "") }); | ||
collection.push(newData); | ||
@@ -90,3 +90,3 @@ util_1.default.writeToFile(this._f, collection); | ||
if (options && options.upsert) { | ||
data._id = uuid_1.default.v4().replace(/-/g, ""); | ||
data._id = uuid_1.v4().replace(/-/g, ""); | ||
collection.push(data); | ||
@@ -93,0 +93,0 @@ ret.updated = 0; |
import Collection from "./collection"; | ||
import { ModelTypeBase } from "./util"; | ||
export * as util from "./util"; | ||
export * as collection from "./collection"; | ||
declare class DiskDB<CollectionTypes extends { | ||
[key: string]: ModelTypeBase; | ||
[key: string]: object; | ||
}> { | ||
@@ -6,0 +7,0 @@ _db: { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -10,2 +29,4 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
var util_1 = __importDefault(require("./util")); | ||
exports.util = __importStar(require("./util")); | ||
exports.collection = __importStar(require("./collection")); | ||
var DiskDB = /** @class */ (function () { | ||
@@ -12,0 +33,0 @@ function DiskDB() { |
@@ -5,3 +5,3 @@ export declare type ModelTypeBase = { | ||
export declare type CollectionType<ModelType extends ModelTypeBase = ModelTypeBase> = Array<ModelType>; | ||
export declare type QueryType<ModelType extends ModelTypeBase> = Partial<ModelType> | undefined | null; | ||
export declare type QueryType<ModelType extends ModelTypeBase> = Partial<EnrichModelType<ModelType>> | undefined | null; | ||
export declare type EnrichModelType<ModelType> = ModelType & ModelTypeBase; | ||
@@ -13,3 +13,3 @@ export declare class util { | ||
static removeFile(file: string): any; | ||
static updateFiltered<ModelType extends ModelTypeBase>(collection: CollectionType<ModelType>, query: QueryType<ModelType>, data: Object, multi?: boolean): CollectionType<ModelType>; | ||
static updateFiltered<CollectionModelType>(collection: CollectionType<CollectionModelType & ModelTypeBase>, query: QueryType<CollectionModelType & ModelTypeBase>, data: Object, multi?: boolean): CollectionType<CollectionModelType & ModelTypeBase>; | ||
static removeFiltered<ModelType extends ModelTypeBase>(collection: CollectionType<ModelType>, query?: QueryType<ModelType>, multi?: boolean): CollectionType<ModelType>; | ||
@@ -16,0 +16,0 @@ static finder<ModelType extends ModelTypeBase>(collection: CollectionType<ModelType>, query?: QueryType<ModelType>, multi?: boolean): any[]; |
{ | ||
"name": "tsdiskdb", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "TypeScript disk-based JSON database for storing small structures with a Mongo-like interface", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
437
README.md
@@ -1,2 +0,2 @@ | ||
# diskDB | ||
# tsDiskDB | ||
@@ -7,19 +7,20 @@ A Lightweight Disk based JSON Database with a MongoDB like API for Node, written in TypeScript. | ||
- [diskDB](#diskdb) | ||
- [tsDiskDB](#tsdiskdb) | ||
- [Contents](#contents) | ||
- [Getting Started](#getting-started) | ||
- [Documentation](#documentation) | ||
- [Connect to DB](#connect-to-db) | ||
- [Load Collections](#load-collections) | ||
- [Load Multiple Collections](#load-multiple-collections) | ||
- [Write/Save to Collection](#writesave-to-collection) | ||
- [Read from Collection](#read-from-collection) | ||
- [db.collectionName.find()](#dbcollectionnamefind) | ||
- [db.collectionName.findOne(query)](#dbcollectionnamefindonequery) | ||
- [Update Collection](#update-collection) | ||
- [Remove Collection](#remove-collection) | ||
- [Count](#count) | ||
- [Load collections](#load-collections) | ||
- [Load multiple collections](#load-multiple-collections) | ||
- [Save models in a collection](#save-models-in-a-collection) | ||
- [Search a collection](#search-a-collection) | ||
- [Find many models in a collection](#find-many-models-in-a-collection) | ||
- [Find one model in a collection](#find-one-model-in-a-collection) | ||
- [Update a collection](#update-a-collection) | ||
- [Remove a collection](#remove-a-collection) | ||
- [Count models in a collection](#count-models-in-a-collection) | ||
- [Appendix](#appendix) | ||
## Getting Started | ||
Install the module locally : | ||
Install the module: | ||
```bash | ||
@@ -29,220 +30,210 @@ $ npm install tsdiskdb | ||
```js | ||
var db = require('tsdiskdb'); | ||
db = db.connect('/path/to/db-folder', ['collection-name']); | ||
// you can access the traditional JSON DB methods here | ||
``` | ||
Import & intitialize it with: | ||
## Documentation | ||
### Connect to DB | ||
```js | ||
db.connect(pathToFolder, ['filename']); | ||
```ts | ||
var db = require("tsdiskdb"); | ||
// or with the import syntax, if supported: | ||
import db from "tsdiskdb"; | ||
``` | ||
Filename will be the name of the JSON file. You can omit the extension, tsdiskDB will take care of it for you. | ||
```js | ||
var db = require('tsdiskdb'); | ||
db = db.connect('/examples/db', ['articles']); | ||
// or simply | ||
db.connect('/examples/db', ['articles']); | ||
Then, connect to a `.json` 'DB' with: | ||
```ts | ||
db.connect(pathToFolder, ["filename"]); | ||
``` | ||
This will check for a directory at given path, if it does not exits, tsdiskDB will throw an error and exit. | ||
Where `filename` is the name of the `.json` file. You can omit the extension. This method also returns the instance itself so it can be used for chaining calls as well. | ||
If the directory exists but the file/collection does not exist, tsdiskDB will create it for you. | ||
This will check for a directory at given path, if it does not exits, tsDiskDB will throw an error and exit. | ||
**Note** : If you have manually created a JSON file, please make sure it contains a valid JSON array, otherwise tsdiskDB | ||
will return an empty array. | ||
If the directory exists but the file does not exist, tsDiskDB will create it for you. | ||
```js | ||
[] | ||
``` | ||
Else it will throw an error like | ||
**Note** : If you have manually created a JSON file, please make sure it contains a valid JSON array, otherwise tsDiskDB | ||
will return an empty array (`[]`). | ||
```bash | ||
undefined:0 | ||
^ | ||
SyntaxError: Unexpected end of input | ||
``` | ||
--- | ||
### Load Collections | ||
Alternatively you can also load collections like | ||
```js | ||
var db = require('tsdiskdb'); | ||
// this | ||
db = db.connect('/examples/db'); | ||
db.loadCollections(['articles']); | ||
### Load collections | ||
Alternatively you can also load collections with the following syntaxes: | ||
```ts | ||
var db = require("tsdiskdb"); | ||
// variant 1 | ||
db = db.connect("/path/to/folder"); | ||
db.loadCollections(["articles"]); | ||
// variant 2 | ||
db.connect("/path/to/folder"); | ||
db.loadCollections(["articles"]); | ||
// variant 3 | ||
db.connect("/path/to/folder").loadCollections(["articles"]); | ||
//or | ||
db.connect('/examples/db'); | ||
db.loadCollections(['articles']); | ||
//or | ||
db.connect('/examples/db') | ||
.loadCollections(['articles']); | ||
//or | ||
db.connect('/examples/db', ['articles']); | ||
db.connect("/path/to/folder", ["articles"]); | ||
``` | ||
#### Load Multiple Collections | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles','comments','users']); | ||
#### Load multiple collections | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("/path/to/folder", ["articles", "users"]); | ||
``` | ||
--- | ||
### Write/Save to Collection | ||
```js | ||
### Save models in a collection | ||
```ts | ||
db.collectionName.save(object); | ||
``` | ||
Once you have loaded a collection, you can access the collection's methods using the dot notation like | ||
```js | ||
db.[collectionName].[methodname] | ||
Once you have loaded a collection, you can access the collection's methods the following way: | ||
```ts | ||
db.collectionName.methodName; | ||
``` | ||
To save the data, you can use | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('db', ['articles']); | ||
To save a modified instance of a collection, use: | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("db", ["articles"]); | ||
var article = { | ||
title : "tsdiskDB rocks", | ||
published : "today", | ||
rating : "5 stars" | ||
} | ||
title: "Article 1", | ||
published: "today", | ||
rating: "10/10", | ||
}; | ||
db.articles.save(article); | ||
// or | ||
db.articles.save([article]); | ||
``` | ||
The saved data will be | ||
```js | ||
```ts | ||
[ | ||
{ | ||
"title": "tsdiskDB rocks", | ||
"published": "today", | ||
"rating": "5 stars", | ||
"_id": "0f6047c6c69149f0be0c8f5943be91be" | ||
} | ||
] | ||
{ | ||
title: "Article 1", | ||
published: "today", | ||
rating: "10/10", | ||
_id: "d6f39a8dc7494d19a3eb60a008e71cd9", | ||
}, | ||
]; | ||
``` | ||
You can also save multiple objects at once like | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('db', ['articles']); | ||
You can also save multiple objects at once: | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("db", ["articles"]); | ||
var article1 = { | ||
title : 'tsdiskDB rocks', | ||
published : 'today', | ||
rating : '5 stars' | ||
} | ||
title: "Article 1", | ||
published: "today", | ||
rating: "10/10", | ||
}; | ||
var article2 = { | ||
title : 'tsdiskDB rocks', | ||
published : 'yesterday', | ||
rating : '5 stars' | ||
} | ||
title: "Article 2", | ||
published: "yesterday", | ||
rating: "7/10", | ||
}; | ||
var article3 = { | ||
title : 'tsdiskDB rocks', | ||
published : 'today', | ||
rating : '4 stars' | ||
} | ||
db.articles.save([article1, article2, article3]); | ||
db.articles.save([article1, article2]); | ||
``` | ||
And this will return the inserted objects | ||
```js | ||
[ { title: 'tsdiskDB rocks', | ||
published: 'today', | ||
rating: '4 stars', | ||
_id: 'b1cdbb3525b84e8c822fc78896d0ca7b' }, | ||
{ title: 'tsdiskDB rocks', | ||
published: 'yesterday', | ||
rating: '5 stars', | ||
_id: '42997c62e1714e9f9d88bf3b87901f3b' }, | ||
{ title: 'tsdiskDB rocks', | ||
published: 'today', | ||
rating: '5 stars', | ||
_id: '4ca1c1597ddc4020bc41b4418e7a568e' } ] | ||
```ts | ||
[ | ||
{ | ||
title: "Article 1", | ||
published: "today", | ||
rating: "10/10", | ||
_id: "628574cc74384f8eb07236ef99140773", | ||
}, | ||
{ | ||
title: "Article 2", | ||
published: "yesterday", | ||
rating: "7/10", | ||
_id: "fd976e7ba0c64eb8acc2855701c32dfb", | ||
}, | ||
]; | ||
``` | ||
--- | ||
### Read from Collection | ||
There are 2 methods available for reading the JSON collection | ||
* db.collectionName.find(query) | ||
* db.collectionName.findOne(query) | ||
### Search a collection | ||
#### db.collectionName.find() | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
To search a collection, use: | ||
- `db.collectionName.find({ query })` to find many models matching the specified criteria | ||
- `db.collectionName.findOne({ query })` to find just one model matching the specified criteria | ||
### Find many models in a collection | ||
Use the following code to find all models in a collection: | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("/path/to/folder", ["articles"]); | ||
db.articles.find(); | ||
``` | ||
This will return all the records | ||
```js | ||
[{ | ||
title: 'tsdiskDB rocks', | ||
published: 'today', | ||
rating: '5 stars', | ||
_id: '0f6047c6c69149f0be0c8f5943be91be' | ||
}] | ||
```ts | ||
[ | ||
{ | ||
title: "tsdiskDB rocks", | ||
published: "today", | ||
rating: "5 stars", | ||
_id: "0f6047c6c69149f0be0c8f5943be91be", | ||
}, | ||
]; | ||
``` | ||
You can also query with a criteria like | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
db.articles.find({rating : "5 stars"}); | ||
``` | ||
This will return all the articles which have a rating of 5. | ||
Find can take multiple criteria | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
db.articles.find({rating : "5 stars", published: "yesterday"}); | ||
You can also query with a criteria that is a partial object of the original one stored. | ||
For example: | ||
```ts | ||
db.articles.find({ rating: "7/10", published: "yesterday" }); | ||
``` | ||
This will return all the articles with a rating of 5, published yesterday. | ||
Nested JSON : | ||
With the data inside the collection fed by the aforementioned snippets, this would return: | ||
```js | ||
var articleComments = { | ||
title: 'tsdiskDB rocks', | ||
published: '2 days ago', | ||
comments: [{ | ||
name: 'a user', | ||
comment: 'this is cool', | ||
rating: 2 | ||
}, { | ||
name: 'b user', | ||
comment: 'this is ratchet', | ||
rating: 3 | ||
}, { | ||
name: 'c user', | ||
comment: 'this is awesome', | ||
rating: 2 | ||
}] | ||
} | ||
```json | ||
[ | ||
{ | ||
"title": "Article 2", | ||
"published": "yesterday", | ||
"rating": "7/10", | ||
"_id": "fd976e7ba0c64eb8acc2855701c32dfb" | ||
} | ||
] | ||
``` | ||
```js | ||
var savedArticle = db.articles.save([articleComments); | ||
foundArticles = db.articles.find({rating : 2}); | ||
``` | ||
Since tsdiskDB is mostly for light weight data storage, avoid nested structures and huge datasets. | ||
#### db.collectionName.findOne(query) | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
Since tsDiskDB is mostly for lightweight data storage, avoid nested structures and huge datasets. | ||
#### Find one model in a collection | ||
```ts | ||
db.articles.findOne(); | ||
``` | ||
If you do not pass a query, tsdiskDB will return the first article in the collection. If you pass a query, it will return first article in the filtered data. | ||
If you do not pass a query, tsDiskDB will return the first article in the collection. If you pass a query, it will return first article in the filtered data. | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
db.articles.findOne({_id: '0f6047c6c69149f0be0c8f5943be91be'}); | ||
```ts | ||
db.articles.findOne({ _id: "0f6047c6c69149f0be0c8f5943be91be" }); | ||
``` | ||
Note that models can also be queried by their `_id` field, like above. | ||
--- | ||
### Update Collection | ||
```js | ||
### Update a collection | ||
```ts | ||
db.collectionName.update(query, data, options); | ||
@@ -252,70 +243,86 @@ ``` | ||
You can also update one or many objects in the collection | ||
```js | ||
```ts | ||
options = { | ||
multi: false, // update multiple - default false | ||
upsert: false // if object is not found, add it (update-insert) - default false | ||
} | ||
multi: false, // update multiple - default false | ||
upsert: false, // if object is not found, add it (update-insert) - default false | ||
}; | ||
``` | ||
Usage | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
Sample usage: | ||
```ts | ||
var query = { | ||
title : 'tsdiskDB rocks' | ||
title: "tsdiskDB rocks", | ||
}; | ||
var dataToBeUpdate = { | ||
title : 'tsdiskDB rocks again!', | ||
var dataToBeUpdated = { | ||
title: "tsdiskDB rocks again!", | ||
}; | ||
var options = { | ||
multi: false, | ||
upsert: false | ||
multi: false, | ||
upsert: false, | ||
}; | ||
var updated = db.articles.update(query, dataToBeUpdate, options); | ||
var updated = db.articles.update(query, dataToBeUpdated, options); | ||
console.log(updated); // { updated: 1, inserted: 0 } | ||
``` | ||
--- | ||
### Remove Collection | ||
```js | ||
### Remove a collection | ||
```ts | ||
db.collectionName.remove(query, multi); | ||
``` | ||
You can remove the entire collection (including the file) or you can remove the matched objects by passing in a query. When you pass a query, you can either delete all the matched objects or only the first one by passing `multi` as `false`. The default value of `multi` is `true`. | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
db.articles.remove({rating : "5 stars"}); | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("/path/to/folder", ["articles"]); | ||
db.articles.remove({ rating: "5 stars" }); | ||
``` | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
db.articles.remove({rating : "5 stars"}, true); // remove all matched. Default - multi = true | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("/path/to/folder", ["articles"]); | ||
db.articles.remove({ rating: "5 stars" }, true); // remove all matched. Default - multi = true | ||
``` | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
db.articles.remove({rating : "5 stars"}, false); // remove only the first match | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("/path/to/folder", ["articles"]); | ||
db.articles.remove({ rating: "5 stars" }, false); // remove only the first match | ||
``` | ||
Using remove without any params will delete the file and will remove the db instance. | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("/path/to/folder", ["articles"]); | ||
db.articles.remove(); | ||
``` | ||
After the above operation `db.articles` is `undefined`. | ||
--- | ||
### Count | ||
```js | ||
### Count models in a collection | ||
```ts | ||
db.collectionName.count(); | ||
``` | ||
Will return the count of objects in the Collection | ||
```js | ||
var db = require('tsdiskdb'); | ||
db.connect('/examples/db', ['articles']); | ||
```ts | ||
var db = require("tsdiskdb"); | ||
db.connect("/path/to/folder", ["articles"]); | ||
db.articles.count(); // will give the count | ||
``` | ||
``` | ||
# Appendix | ||
The project was originally based off [`diskdb`](https://github.com/arvindr21/diskDB) and is now a more advanced, improved version of the project, written `TypeScript`. |
import path from "path"; | ||
import { isArray } from "lodash"; | ||
import uuid from "uuid"; | ||
import { v4 } from "uuid"; | ||
@@ -72,3 +72,3 @@ import util, { CollectionType, EnrichModelType, ModelTypeBase, QueryType } from "./util"; | ||
...data[i], | ||
_id: uuid.v4().replace(/-/g, ""), | ||
_id: v4().replace(/-/g, ""), | ||
} as CollectionModelType & ModelTypeBase; | ||
@@ -86,3 +86,3 @@ collection.push(d); | ||
...data, | ||
_id: uuid.v4().replace(/-/g, ""), | ||
_id: v4().replace(/-/g, ""), | ||
} as CollectionModelType & ModelTypeBase; | ||
@@ -127,3 +127,3 @@ | ||
if (options && options.upsert) { | ||
data._id = uuid.v4().replace(/-/g, ""); | ||
data._id = v4().replace(/-/g, ""); | ||
collection.push(data); | ||
@@ -130,0 +130,0 @@ ret.updated = 0; |
@@ -8,3 +8,4 @@ import path from "path"; | ||
type ValuesOf<T extends any[]> = T[number]; | ||
export * as util from "./util"; | ||
export * as collection from "./collection"; | ||
@@ -11,0 +12,0 @@ class DiskDB< |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
45844
791
326