当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript knex.from函数代码示例

本文整理汇总了TypeScript中knex.from函数的典型用法代码示例。如果您正苦于以下问题:TypeScript from函数的具体用法?TypeScript from怎么用?TypeScript from使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了from函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: async

exports.up = async (knex: Knex): Promise<any> => {
  return knex.from("orders").whereNotIn("orderId", KNOWN_ORPHANED_ORDERS).update({orphaned: false});
};
开发者ID:AugurProject,项目名称:augur_node,代码行数:3,代码来源:20180725142500_ipc_orphan_fix.ts

示例2:

 if (!exists) knex.schema.table("orders", (t) => t.boolean("orphaned").defaultTo(0)).then(() => {
   return knex.from("orders").whereIn("orderId", KNOWN_ORPHANED_ORDERS).update({orphaned: true});
 }).catch((e) => { throw e; });
开发者ID:AugurProject,项目名称:augur_node,代码行数:3,代码来源:20180716140300_orphaned_orders.ts

示例3: async

 return async (db: Knex) => {
   await db.from("crowdsourcer_redeemed").where({ transactionHash: log.transactionHash, logIndex: log.logIndex }).del();
   augurEmitter.emit(SubscriptionEventNames.FeeWindowRedeemed, log);
 };
开发者ID:AugurProject,项目名称:augur_node,代码行数:4,代码来源:crowdsourcer.ts

示例4: async

 return async (db: Knex) => {
   augurEmitter.emit(SubscriptionEventNames.FeeWindowCreated, log);
   await db.from("fee_windows").where({ feeWindow: log.feeWindow }).del();
   return db("tokens").where("contractAddress", log.feeWindow).orWhere("feeWindow", log.feeWindow).del();
 };
开发者ID:AugurProject,项目名称:augur_node,代码行数:5,代码来源:fee-window-created.ts

示例5: async

 return async (db: Knex) => {
   await db.from("trading_proceeds").where({ transactionHash: log.transactionHash, logIndex: log.logIndex }).del();
   await db.from("wcl_profit_loss_timeseries").where({ transactionHash: log.transactionHash }).del();
   await updateProfitLossRemoveRow(db, log.transactionHash);
   augurEmitter.emit(SubscriptionEventNames.TradingProceedsClaimed, log);
 };
开发者ID:AugurProject,项目名称:augur_node,代码行数:6,代码来源:trading-proceeds-claimed.ts

示例6: async

 return async (db: Knex) => {
   const eventName = log.eventName as keyof typeof SubscriptionEventNames;
   augurEmitter.emit(SubscriptionEventNames[eventName], log);
   return db.from("approvals").where({ transactionHash: log.transactionHash, logIndex: log.logIndex }).del();
 };
开发者ID:AugurProject,项目名称:augur_node,代码行数:5,代码来源:approval.ts

示例7: async

 return async (db: Knex) => {
   await db.from("orders").where("orderId", log.orderId).delete();
   augurEmitter.emit(SubscriptionEventNames.OrderCreated, log);
 };
开发者ID:AugurProject,项目名称:augur_node,代码行数:4,代码来源:order-created.ts

示例8: async

 return async (db: Knex) => {
   await db.from("initial_reports").where("marketId", log.market).update({ redeemed: true });
   augurEmitter.emit(SubscriptionEventNames.InitialReporterRedeemed, log);
 };
开发者ID:AugurProject,项目名称:augur_node,代码行数:4,代码来源:initial-report-redeemed.ts

示例9: async

 return async (db: Knex) => {
   await db.update({
     needsDisavowal: db.raw("needsDisavowal - 1"),
   }).into("markets").where("marketId", log.market);
   return db.from("crowdsourcers").where("marketId", log.market).update({ disavowed: db.raw("disavowed + 1") });
 };
开发者ID:AugurProject,项目名称:augur_node,代码行数:6,代码来源:market-participants-disavowed.ts


注:本文中的knex.from函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。