Code Monkey home page Code Monkey logo

Comments (4)

Alfagun74 avatar Alfagun74 commented on September 15, 2024 1

yeah fuck this totally.

from nestjs-paginate.

Helveg avatar Helveg commented on September 15, 2024

It doesn't seem like this is something that TypeORM supports out of the box.

Using the approach you linked would not work as-is:

Z
Ab 1
Ab 10

note how Z would be sorted before Ab 1 because of its length?

If you can figure out what you need using the QueryBuilder API, then you can also pass a QueryBuilder into paginate, instead of the repository.

from nestjs-paginate.

Alfagun74 avatar Alfagun74 commented on September 15, 2024

You're right. I can't find an easy way to do this properly via SQL honestly.

from nestjs-paginate.

Helveg avatar Helveg commented on September 15, 2024

It seems like indeed at the SQL level the world hasn't really settled onto a solution yet. Take a look at the lengths this answer tries to go: https://stackoverflow.com/a/58154535/1016004

from nestjs-paginate.

Related Issues (20)

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.