You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a tiny point that in general sql commands are quite long and can be complex to understand. Having them on one line makes them almost impossible to read due to scrolling etc
constpostSymptomScale=(symptom,username,comment_1,comment_2,comment_3,comment_4,comment_5,comment_6,comment_7,comment_8,comment_9,comment_10)=>dbConnect.query('insert into symptom_scale (symptom_id, user_id, comment_1, comment_2, comment_3, comment_4, comment_5, comment_6, comment_7, comment_8, comment_9, comment_10) values ((select id from symptoms where symptom = $1 and user_id=(select id from users where username=$2)), (select id from users where username = $2), $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)',[symptom,username,comment_1,comment_2,comment_3,comment_4,comment_5,comment_6,comment_7,comment_8,comment_9,comment_10]);
// post scale comment for factor scale
constpostFactorScale=(factor,username,comment_1,comment_2,comment_3,comment_4,comment_5,comment_6,comment_7,comment_8,comment_9,comment_10)=>dbConnect.query('insert into factor_scale (factor_id, user_id, comment_1, comment_2, comment_3, comment_4, comment_5, comment_6, comment_7, comment_8, comment_9, comment_10) values ((select id from factors where factor = $1 and user_id=(select id from users where username=$2)), (select id from users where username = $2), $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)',[factor,username,comment_1,comment_2,comment_3,comment_4,comment_5,comment_6,comment_7,comment_8,comment_9,comment_10]);
I would advise making this more readable splitting the query over several lines. In general I believe it is not advisable to have a line length of over 80 characters.
The text was updated successfully, but these errors were encountered:
Just a tiny point that in general sql commands are quite long and can be complex to understand. Having them on one line makes them almost impossible to read due to scrolling etc
correl/src/model/queries/postQueries.js
Lines 11 to 14 in 664063b
I would advise making this more readable splitting the query over several lines. In general I believe it is not advisable to have a line length of over 80 characters.
The text was updated successfully, but these errors were encountered: