How to use the getManager function from typeorm

Find comprehensive JavaScript typeorm.getManager code examples handpicked from public code repositorys.

444
445
446
447
448
449
450
451
452
453
      .catch(function (err) {
        options.error(err);
      });
  }
} else if (currencyOperation.add.includes(action)) {
  // typeorm.getManager()
  // .insert(orm['models'][options['tableName']],reqObj['delta'])
  // .then(function(res){
  // 	options.success(res.identifiers)
  // }).catch(function(err){
fork icon0
star icon0
watch icon1

+ 3 other calls in file

44
45
46
47
48
49
50
51
52
53
var typeorm_1 = require("typeorm");
var App_1 = require("../..//utils/App");
var Config = __importStar(require("../../utils/Config"));
var WebService = /** @class */ (function () {
    function WebService() {
        this.db = typeorm_1.getManager();
        this.transporter = App_1.App.CreateEmailAccount();
    }
    WebService.prototype.feedback = function (reqData) {
        return __awaiter(this, void 0, void 0, function () {
fork icon0
star icon0
watch icon0

43
44
45
46
47
48
49
50
51
52
RawQuery.ConstData = function (code) {
    return __awaiter(this, void 0, void 0, function () {
        var data;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0: return [4 /*yield*/, typeorm_1.getManager().query("select data from app_const_data where code='" + code + "' ")];
                case 1:
                    data = _a.sent();
                    if (data && data[0] && data[0].data) {
                        return [2 /*return*/, data[0].data];
fork icon0
star icon0
watch icon0

+ 3 other calls in file

146
147
148
149
150
151
152
153
154
  opts.latlng,
  opts.email
)

// Start transaction
await getManager().transaction(async trxMgr => {
  const bizplace = await createBizplace(trxMgr, name, description, address, postalCode, latlng)
  await createRelations(trxMgr, bizplace, email)
})
fork icon0
star icon0
watch icon8

+ 15 other calls in file