Giter VIP home page Giter VIP logo

knex-querylab's People

Contributors

dependabot[bot] avatar michaelavila 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

knex-querylab's Issues

site crashes when you run my code

Bug
The site simply becomes an empty page when you run a code given in the "To Reproduce" section in this message.

To Reproduce
Steps to reproduce the behavior:

  1. Go to here
  2. paste this code in the "Expression" input,
knex('hello-world').select('foo').where("name", false /* or you can pass 'false' as the second parameter*/)
  1. Now the website is simply blank.

Desktop:
The problem is not about browser, device or OS
it happens everywhere.

Smartphone
The problem is not about browser, device or OS
it happens everywhere.

Additional context
when the site turns blank, you can see an error in the console:
Uncaught TypeError: Cannot read properties of undefined (reading 'slice')
meaning something could be wrong in your redux code. But I find this very unlikely. I think you should put an error boundry.

I hope this helps.

with clause doesn't work

knex('table').with('table', knex.raw('select something from somewhere'))

Should compile to something like

with "table" as (select something from somewhere) select * from table

Instead, it doesn't compile at all.

Transactions

Is your feature request related to a problem? Please describe.
It would be nice if Transactions would be supported too.

Describe the solution you'd like
I would like the examples from knex to work

// Using trx as a query builder:
knex.transaction(function(trx) {

  const books = [
    {title: 'Canterbury Tales'},
    {title: 'Moby Dick'},
    {title: 'Hamlet'}
  ];

  return trx
    .insert({name: 'Old Books'}, 'id')
    .into('catalogues')
    .then(function(ids) {
      books.forEach((book) => book.catalogue_id = ids[0]);
      return trx('books').insert(books);
    });
})
.then(function(inserts) {
  console.log(inserts.length + ' new books saved.');
})
.catch(function(error) {
  // If we get here, that means that neither the 'Old Books' catalogues insert,
  // nor any of the books inserts will have taken place.
  console.error(error);
});

Describe alternatives you've considered
Maybe have list of what and what is not supported bei the querylab

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.