How to use the getConnection function from typeorm
Find comprehensive JavaScript typeorm.getConnection code examples handpicked from public code repositorys.
GitHub: UrosHCS/nest-starter
18 19 20 21 22 23 24 25 26
await (new UserSeed().run()) await (new CredentialSeed().run()) }).then(async () => { await getConnection().close() console.log('done') }).catch(async reason => {
3
9
4
+ 31 other calls in file
34 35 36 37 38 39 40 41 42
await new CredentialFactory().create({ user }) }).then(() => { getConnection().close() console.log('done') }).catch(reason => {
3
9
4
+ 31 other calls in file
GitHub: ShipChain/engine
112 113 114 115 116 117 118 119 120 121
if (config.get('DEPLOY_CONTRACTS')) { logger.info(`Deploying local contracts`); const deployedContracts = await test_net_utils.setupLocalTestNetContracts( { LOAD: LATEST_LOAD, ShipToken: LATEST_SHIPTOKEN, NOTARY: LATEST_NOTARY }, await typeorm.getConnection().getRepository(Wallet).find(), contractMetaData, ); network = deployedContracts.LOAD.network.title;
1
14
9
+ 9 other calls in file
12 13 14 15 16 17 18 19 20 21
const xf_user_upgrade_active = require("./../models/xf_upgrade").xf_user_upgrade_active; const xf_user_group = require("./../models/xf_group").xf_user_group; const xf_user_upgrade = require("./../models/xf_user_upgrade").xf_user_upgrade; const {converttotimestamp,addtotimestampdays,convertfromtimestamp} = require("./../dates/date"); async function getusergroups(username) { const connection = typeorm.getConnection(); const userRepository = connection.getRepository(backend); const user = await userRepository.findOne({ where: { username: username,
1
4
1
+ 5 other calls in file
15 16 17 18 19 20 21 22 23 24 25 26
entities: [ new EntitySchema(Users) ] }).then(() => { const dbConnection = typeorm.getConnection('mysql') const repo = dbConnection.getRepository("Users") return repo }).then((repo) => {
0
0
0
GitHub: debayan3/node-goof
22 23 24 25 26 27 28 29 30 31 32 33 34
}) router.post('/', async (req, res, next) => { try { const mongoConnection = typeorm.getConnection('mysql') const repo = mongoConnection.getRepository("Users") const user = {} user.name = req.body.name
0
0
0
typeorm.getCustomRepository is the most popular function in typeorm (5799 examples)