added the order by arguments for GET_ALL_USERS_PAGINATE and GET_ALL_USERS procedures.
this will now order the users by LastName, then FirstName in alphabetical order (startint with a). #52
This commit is contained in:
parent
da01f6670e
commit
66def93ff1
@ -4,7 +4,6 @@ namespace SQLiteRepository
|
|||||||
{
|
{
|
||||||
public const string GET_LOGS_IN_LAST_X_MINUTES= "select * from TimeLogDb where "+nameof(TimeLogDb.SwipeEventDateTime)+" > ? AND "+nameof(TimeLogDb.UserId_FK)+"=?";
|
public const string GET_LOGS_IN_LAST_X_MINUTES= "select * from TimeLogDb where "+nameof(TimeLogDb.SwipeEventDateTime)+" > ? AND "+nameof(TimeLogDb.UserId_FK)+"=?";
|
||||||
public const string GET_TIMELOGS = "select * from "+nameof(TimeLogDb)+ " where (" + nameof(TimeLogDb.UserId_FK) + "=? AND " + nameof(TimeLogDb.CalendarWeek) + "=? and " + nameof(TimeLogDb.Year) + "=?)";
|
public const string GET_TIMELOGS = "select * from "+nameof(TimeLogDb)+ " where (" + nameof(TimeLogDb.UserId_FK) + "=? AND " + nameof(TimeLogDb.CalendarWeek) + "=? and " + nameof(TimeLogDb.Year) + "=?)";
|
||||||
public const string GET_ALL_USERS = "select * from " + nameof(UserIdentity);
|
|
||||||
public const string GET_USER_BY_ID = "select * from " + nameof(UserIdentity) + " where " + nameof(UserIdentity.Id) + "=?";
|
public const string GET_USER_BY_ID = "select * from " + nameof(UserIdentity) + " where " + nameof(UserIdentity.Id) + "=?";
|
||||||
|
|
||||||
public const string GET_CARDS_BY_USER_ID = "select * from " + nameof(CardUniqueId) + " where " + nameof(CardUniqueId.UserId_FK) + "=?";
|
public const string GET_CARDS_BY_USER_ID = "select * from " + nameof(CardUniqueId) + " where " + nameof(CardUniqueId.UserId_FK) + "=?";
|
||||||
@ -13,14 +12,19 @@ namespace SQLiteRepository
|
|||||||
|
|
||||||
public const string GET_USER_BY_FIRST_AND_LAST =
|
public const string GET_USER_BY_FIRST_AND_LAST =
|
||||||
"select * from " + nameof(UserIdentity) + " where " + nameof(UserIdentity.FirstName) + " = ? AND " + nameof(UserIdentity.LastName) + " = ?";
|
"select * from " + nameof(UserIdentity) + " where " + nameof(UserIdentity.FirstName) + " = ? AND " + nameof(UserIdentity.LastName) + " = ?";
|
||||||
|
public const string GET_ALL_USERS =
|
||||||
|
"select * from " + nameof(UserIdentity) + " order by " + nameof(UserIdentity.LastName) + " collate nocase, " +
|
||||||
|
nameof(UserIdentity.FirstName) + " collate nocase";
|
||||||
|
|
||||||
public const string UPDATE_CARD_USER_ID = "update " + nameof(CardUniqueId) + " set " + nameof(CardUniqueId.UserId_FK) + "=? where " + nameof(CardUniqueId.Id) + "=?";
|
public const string UPDATE_CARD_USER_ID = "update " + nameof(CardUniqueId) + " set " + nameof(CardUniqueId.UserId_FK) + "=? where " + nameof(CardUniqueId.Id) + "=?";
|
||||||
|
public const string GET_ALL_USERS_PAGINATE =
|
||||||
|
"select * from " + nameof(UserIdentity) + " order by " + nameof(UserIdentity.LastName) + " collate nocase, " +
|
||||||
|
nameof(UserIdentity.FirstName) + " collate nocase limit ? offset ?";
|
||||||
|
|
||||||
public const string SEARCH_USER_LIST = "SELECT * FROM " + nameof(UserIdentity) + " where(" + nameof(UserIdentity.FirstName) + " Like ? OR " + nameof(UserIdentity.LastName) + " Like ?)";
|
public const string SEARCH_USER_LIST = "SELECT * FROM " + nameof(UserIdentity) + " where(" + nameof(UserIdentity.FirstName) + " Like ? OR " + nameof(UserIdentity.LastName) + " Like ?)";
|
||||||
|
|
||||||
public const string GET_LAST_TIMELOG_DIRECTION = "SELECT * FROM " + nameof(TimeLogDb) + " where " + nameof(TimeLogDb.UserId_FK) + " = ? order by " + nameof(TimeLogDb.SwipeEventDateTime) + " desc LIMIT 1";
|
public const string GET_LAST_TIMELOG_DIRECTION = "SELECT * FROM " + nameof(TimeLogDb) + " where " + nameof(TimeLogDb.UserId_FK) + " = ? order by " + nameof(TimeLogDb.SwipeEventDateTime) + " desc LIMIT 1";
|
||||||
|
|
||||||
public const string GET_ALL_USERS_PAGINATE = "select * from "+ nameof(UserIdentity)+" limit ? offset ?";
|
|
||||||
|
|
||||||
public const string GET_TOTAL_USER_COUNT = "select Max("+nameof(UserIdentity.Id)+") from " + nameof(UserIdentity);
|
public const string GET_TOTAL_USER_COUNT = "select Max("+nameof(UserIdentity.Id)+") from " + nameof(UserIdentity);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user