This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Column, CreateDateColumn, Entity, PrimaryGeneratedColumn} from 'typeorm' | |
@Entity() | |
export class Test { | |
@PrimaryGeneratedColumn() id: number | |
@Column() category: string | |
@CreateDateColumn() createdAt: Date | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose') | |
mongoose.connect('mongodb://localhost/test') | |
const schema = new mongoose.Schema({}, {strict: false}) | |
const model = mongoose.model('test', schema) | |
model.collection.indexExists('users.user_1', (err, res) => { | |
console.log(err, res) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as Mongoose from 'mongoose' | |
Mongoose.connect('mongodb://localhost/test') | |
Mongoose.set('debug', true) | |
const schema = new Mongoose.Schema({ | |
a: { | |
type: String, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
const Mongoose = require("mongoose"); | |
Mongoose.connect('mongodb://lo-srv-0.s.chipwing.com/test'); | |
const schema = new Mongoose.Schema({ | |
_id: { | |
type: Number, | |
}, | |
a: { | |
unique: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
(() => __awaiter(this, void 0, void 0, function* () { | |
const now = Date.now(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var code='iVBORw0KGgoAAAANSUhEUgAAAgQAAAIOCAYAAADHmRXwAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAACXZwQWcAAAIEAAACDgCE2xfWAACAAElEQVR42u1dCdxU0//Oz1YSpZA9SyoiZZ8IIVkSKku2UBNSabNEikqlZBAK2cq+JYwla2RX1l/x2ve1bH/Lj5z/PN+Ze+fce8+9c+9s78zbM32eT+/M3Lkzc+ae833Od3vq1atXTxEEQRAEscKDg0AQBEEQBAeAIAiCIAgOAEEQBEEQJAQEQRAEQZAQEARBEARBQkAQBEEQRBhCwBtvvPHGG2+81Y1bwYSArIkgCIIgqhskBARBEARBkBAQBEEQBEFCQBAEQRDEikoIYomkSsSivqZG1SRiql48qZLxoGNjKlGTVPESf568PnuBx+iIx+N5niOuUiMYYXwwnjXhxyf1+0T5HrWGWEIlI33O1DgkEyrGRYsgCBICt1EJugUYnNRCXINDaqItrpaxi2EhxzvE/RfueLIGB4Q2DLk/D4xi0NeNe4xirpvz8zvHsyYRN7yfPqZxxxjg+4rBtowx3j/g+6SfjgWOda6b3+tz/z7lBb6r8bPI7x6B6GSuq1zjhvey/revLcPvKGMc9holCIKEoDo8BFF2nDg2a7x8F8QQBtU2kJ5FF4txzHAO02d0fZ6a0uwAc+3cbaOF76J9BtvQu7weDoON463XCSGIR9vR5/q8pt8plxcgljKesdr3EtiG2fdzxlOfM5hMuK8rD1nSfi8jIQgw+jk/H0EQJAR1kxDEPTtHWVxNRjiKERJCkOv9DZ8xQyQ8n6cou9scHgWXEampqfGSF8vIezwYAeNtHKNc3pyswbNIRDg+FvcxnOG9CaWFy8UfDzcK2d8/TKgkNbYFEAL36wmCICGofkKQa1GTxdhncbUW6hrX4m1yw2ceM8b8fRd8t/HUDGTSHIf3GoYIBtLoJg42wJYhT3sE0t6AhE9eg4 |