Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xpress-mongo

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xpress-mongo - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

2

package.json
{
"name": "xpress-mongo",
"version": "0.0.23",
"version": "0.0.24",
"description": "Light Weight ODM for mongoDb",

@@ -5,0 +5,0 @@ "main": "js/index.js",

@@ -14,3 +14,3 @@ import ObjectCollection = require('object-collection');

CollectionInsertOneOptions,
CollectionAggregationOptions
CollectionAggregationOptions, AggregationCursor
} from 'mongodb';

@@ -28,3 +28,3 @@

type FunctionWithRawArgument = { (raw: Collection): Cursor };
type FunctionWithRawArgument = { (raw: Collection): Cursor | AggregationCursor };

@@ -375,3 +375,3 @@

*/
update(set: StringToAnyObject, options: UpdateOneOptions): Promise<UpdateWriteOpResult> {
update(set: StringToAnyObject, options?: UpdateOneOptions): Promise<UpdateWriteOpResult> {
if (!this.id()) throw "UPDATE_ERROR: Model does not have an _id, so we assume it is not from the database.";

@@ -675,3 +675,3 @@ return <Promise<UpdateWriteOpResult>>this.set(set).save(options)

*/
async hasOne(relationship: string, extend: StringToAnyObject = {}): Promise<StringToAnyObject | XMongoModel> {
async hasOne(relationship: string, extend: StringToAnyObject = {}): Promise<any | XMongoModel> {
let config = (<typeof XMongoModel>this.constructor).relationships;

@@ -678,0 +678,0 @@

import ObjectCollection = require('object-collection');
import { ObjectID, Collection, UpdateWriteOpResult, InsertOneWriteOpResult, DeleteWriteOpResultObject, Cursor, FindOneOptions, UpdateOneOptions, CollectionInsertOneOptions, CollectionAggregationOptions } from 'mongodb';
import { ObjectID, Collection, UpdateWriteOpResult, InsertOneWriteOpResult, DeleteWriteOpResultObject, Cursor, FindOneOptions, UpdateOneOptions, CollectionInsertOneOptions, CollectionAggregationOptions, AggregationCursor } from 'mongodb';
import { XMongoSchemaBuilder } from './XMongoSchemaBuilder';
import { PaginationData, StringToAnyObject } from "./CustomTypes";
declare type FunctionWithRawArgument = {
(raw: Collection): Cursor;
(raw: Collection): Cursor | AggregationCursor;
};

@@ -157,3 +157,3 @@ /**

*/
update(set: StringToAnyObject, options: UpdateOneOptions): Promise<UpdateWriteOpResult>;
update(set: StringToAnyObject, options?: UpdateOneOptions): Promise<UpdateWriteOpResult>;
/**

@@ -200,3 +200,3 @@ * Create Model if not id is missing or save document if id is found.

*/
hasOne(relationship: string, extend?: StringToAnyObject): Promise<StringToAnyObject | XMongoModel>;
hasOne(relationship: string, extend?: StringToAnyObject): Promise<any | XMongoModel>;
/**

@@ -203,0 +203,0 @@ * @private

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc