The SQL Query builder for java script. It features both traditional node style callbacks as well as a promise interface for cleaner asynchronize flow control, a stream interface, full featured query and schema builders, transaction support , connection pooling and standardized responses between different query clients and dialects.


instead of just doing some query of your data bases to get data ,you can do a lots of things with the result of your query using java script

If you want to build something and you need your data from data bases you have to learn knex


To start learning knex ,you should know about:

  1. java script
  2. data bases(specially migration)
  3. synchronize VS Asynchronize
  4. promises

If you know this 4 ,my suggestion for learning knex is ,first just go around the knex documentation and reads about the important question that you have to pay attention

for example:

  1. how query in knex working
  2. what does knex return(a promise!)
  3. how can we access the data bases from knex
  4. how we can do some stuff on the result of query of knex

Then :

make a small project for yourself and open the knex documentations to see how does query in knex works.

On that level you are going to learn details about how does knex works

My experience was on inserting data : the documentation mentioned that if you insert some data in your table, the result of the insert is you ides ,but in my project wasn’t working!!!, after a while i just find that i should use returning(id) to get my id back.

don’t be upset when you are beginner in learning knex ,specially when you used to sql ,be patient,you will get your goal:)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.