Rename "create" function to "add" in "scores" modules
parent
c046eeb6ac
commit
4eadf64fac
|
@ -20,7 +20,7 @@ function getGenderID(gender) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function create(name, gender, sportID) {
|
async function add(name, gender, sportID) {
|
||||||
const query = `INSERT INTO scores.divisions(division_name,gender,sport_id)
|
const query = `INSERT INTO scores.divisions(division_name,gender,sport_id)
|
||||||
VALUES($1,$2,$3)
|
VALUES($1,$2,$3)
|
||||||
RETURNING division_id;`;
|
RETURNING division_id;`;
|
||||||
|
@ -64,7 +64,7 @@ async function retrieveBySportAndGender(sportID, gender) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
exports.create = create;
|
exports.add = add;
|
||||||
exports.rename = rename;
|
exports.rename = rename;
|
||||||
exports.remove = remove;
|
exports.remove = remove;
|
||||||
exports.retrieveBySportAndGender = retrieveBySportAndGender;
|
exports.retrieveBySportAndGender = retrieveBySportAndGender;
|
|
@ -13,7 +13,7 @@ class Season {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function create(year) {
|
async function add(year) {
|
||||||
const query = `INSERT INTO scores.seasons(school_year)
|
const query = `INSERT INTO scores.seasons(school_year)
|
||||||
VALUES($1)
|
VALUES($1)
|
||||||
RETURNING season_id;`;
|
RETURNING season_id;`;
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Sport {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function create(name) {
|
async function add(name) {
|
||||||
const query = `INSERT INTO scores.sports(sport_name)
|
const query = `INSERT INTO scores.sports(sport_name)
|
||||||
VALUES($1)
|
VALUES($1)
|
||||||
RETURNING sport_id;`;
|
RETURNING sport_id;`;
|
||||||
|
@ -52,7 +52,7 @@ async function retrieveAll() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
exports.create = create;
|
exports.add = add;
|
||||||
exports.rename = rename;
|
exports.rename = rename;
|
||||||
exports.remove = remove;
|
exports.remove = remove;
|
||||||
exports.retrieveAll = retrieveAll;
|
exports.retrieveAll = retrieveAll;
|
|
@ -13,7 +13,7 @@ class Team {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function create(name, sportID) {
|
async function add(name, sportID) {
|
||||||
const query = `INSERT INTO scores.teams(team_name, sport_id)
|
const query = `INSERT INTO scores.teams(team_name, sport_id)
|
||||||
VALUES($1, $2)
|
VALUES($1, $2)
|
||||||
RETURNING team_id;`;
|
RETURNING team_id;`;
|
||||||
|
@ -55,7 +55,7 @@ async function retrieveBySport(sportID) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
exports.create = create;
|
exports.add = add;
|
||||||
exports.rename = rename;
|
exports.rename = rename;
|
||||||
exports.remove = remove;
|
exports.remove = remove;
|
||||||
exports.retrieveBySport = retrieveBySport;
|
exports.retrieveBySport = retrieveBySport;
|
Reference in New Issue