Skip to content

Commit

Permalink
style(api): reorder Lines query functions in order of usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Harjot1Singh committed May 17, 2019
1 parent 8930c3c commit 59d9514
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions lib/models/Lines.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,6 @@ const BaseModel = require( './BaseModel' )
const CommonQueryBuilder = require( './CommonQueryBuilder' )()

class LineQueryBuilder extends CommonQueryBuilder {
/**
* Given a string of first letters, return a query that searches for the shabad.
* @param letters The first letters to search for a partial match of.
* @param shouldOrder Apply sensible ordering too. `true` by default.
*/
firstLetters( letters, shouldOrder = true ) {
return this.genericSearch( letters, 'first_letters', shouldOrder )
}

/**
* Given a phrase, return a query that searches for the shabad.
* @param phrase the phrase to match.
* @param shouldOrder Apply sensible ordering too. `true` by default.
*/
fullWord( phrase, shouldOrder ) {
return this.genericSearch( phrase, 'gurmukhi', shouldOrder )
}

/**
* Given a search query and column, return a query that searches for the shabad.
* @param search The query to search for a partial match of.
Expand Down Expand Up @@ -70,6 +52,24 @@ class LineQueryBuilder extends CommonQueryBuilder {

return this.orderBy( orderBy )
}

/**
* Given a string of first letters, return a query that searches for the shabad.
* @param letters The first letters to search for a partial match of.
* @param shouldOrder Apply sensible ordering too. `true` by default.
*/
firstLetters( letters, shouldOrder = true ) {
return this.genericSearch( letters, 'first_letters', shouldOrder )
}

/**
* Given a phrase, return a query that searches for the shabad.
* @param phrase the phrase to match.
* @param shouldOrder Apply sensible ordering too. `true` by default.
*/
fullWord( phrase, shouldOrder ) {
return this.genericSearch( phrase, 'gurmukhi', shouldOrder )
}
}

class Lines extends BaseModel {
Expand Down

0 comments on commit 59d9514

Please sign in to comment.