Code Monkey home page Code Monkey logo

egg-sequelize-ts's Introduction

egg-sequelize-ts's People

Contributors

airyland avatar army8735 avatar asher-tan avatar atian25 avatar dead-horse avatar denghongcai avatar duncup avatar fengmk2 avatar foolishchow avatar foveluy avatar huacnlee avatar iyuq avatar jtyjty99999 avatar luicfer avatar popomore avatar stone-lyl avatar tomowang avatar tonyke-bot avatar xadillax avatar xiangdemei avatar yandongxu avatar zhangjx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

egg-sequelize-ts's Issues

使用model 的 bulkCreate 方法,出错了

环境:Windows10 wsl Ubuntu18.04
bulkCreate方法生成的 sql 变成了 insert into user (id,name) value (USER2020513001,'tom')
应该是: insert into user (id,name) value ('USER2020513001','tom')
id 的值缺少了引号
同环境下 create 方法是正确的

是不是需要删除对 egg-sequelize 的引用 呢?

我照 README 操作后,项目跑不起来,报:

error TS2322: Type '{}' is not assignable to type '(string | [string | Literal | Fn, string])[] | { exclude: string[]; include?: (string | [string | Literal | Fn, string])[] | undefined; } | { exclude?: string[] | undefined; include: (string | [...])[]; } | undefined'.
  Type '{}' is not assignable to type 'undefined'.

83           attributes: {},
             ~~~~~~~~~~

  node_modules/sequelize/types/lib/model.d.ts:74:3

是不是需要 npm remove egg-sequelize 呢?

[依赖升级]sequelize版本太低,跟官方库不一致。

参考官方egg-sequelize库的package.json:
https://github.com/eggjs/egg-sequelize/blob/master/package.json
其中sequelize的版本已经是5.0了,但是此项目的依赖还是4.0,这会导致开发时存在一些问题。
具体来说,安装依赖时,由于egg-sequelize-ts依赖的要求,sequelize将会安装4.x的版本,但是4.x的版本没有官方的index.d.ts,而@types/sequelize的ts描述存在大量错误,这会导致开发阶段ts的类型推断错误,从而直接导致编译过程失败,进而完全终止项目开发进程,希望能更新package.json中sequelize的版本以解决这个问题。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.