Skip to content

Is the where statement reusable? 🍵 #137

@sswanv

Description

@sswanv

Hello, now there is a need for paging, you need to find out the data and total number of the corresponding page, and whether the conditional statement can be reused, example:

queryStmt := SELECT(User.AllColumns, UserInvite.AllColumns).
	FROM(UserInvite.INNER_JOIN(User, User.UserID.EQ(UserInvite.UserID))).
	WHERE(UserInvite.InviteUserID.EQ(Int64(9527)))

countStmt := SELECT(COUNT(User.UserID)).
        FROM(UserInvite.INNER_JOIN(User, User.UserID.EQ(UserInvite.UserID))).
	WHERE(UserInvite.InviteUserID.EQ(Int64(9527)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions