Skip to content

Paginated query not working SQL server 2012 #200

Closed

Description

@samikroy-work

Pagination is not effecting in SQL server .

CODE:
entityManager.getRepository(elementObjectType).createQueryBuilder("q")
.setFirstResult(paginatedRequest.startIndex|| 1)
.setMaxResults(paginatedRequest.maxCount ||10)
/console.log("sql ",q.getSql());/
.getManyAndCount().then(data=> {
let paginatedResponse: PaginatedResponse = new PaginatedResponse();
paginatedResponse.records = data[0] as BaseEntity[];
paginatedResponse.totalRecords = data[1];
resolve(paginatedResponse);
}, error=>reject(error));

Activity

  1. pleerock commented on Jan 15, 2017

    @pleerock
    Member

    can you provide more info? maybe error or something? I think Ive checked this lib with latest version of sql server. 2012 is older then that. Does this version supports offset fetch ? (https://technet.microsoft.com/en-us/library/gg699618(v=sql.110).aspx)

  2. pleerock commented on Jun 30, 2017

    @pleerock
    Member

    Closing as no answer from op. But pagination should totally work for mssql 2012 and newer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions