Cast sql string to sql enum
This commit is contained in:
parent
9744314333
commit
f6370386b4
@ -7,7 +7,7 @@ open Degenz.DbService
|
||||
open Degenz.Messaging
|
||||
|
||||
module Game =
|
||||
let SameTargetAttackCooldown = System.TimeSpan.FromHours(2)
|
||||
let SameTargetAttackCooldown = System.TimeSpan.FromHours(1)
|
||||
|
||||
let getClassButtonColor = function
|
||||
| 0 -> ButtonStyle.Danger
|
||||
|
@ -125,7 +125,7 @@ let checkHasAchievement connStr (did : uint64) (achievement : string) = async {
|
||||
[ ( "did" , Sql.string (string did) )
|
||||
( "symbol", Sql.string achievement ) ]
|
||||
|> Sql.query """
|
||||
WITH ach AS (SELECT id FROM achievement WHERE symbol = @symbol),
|
||||
WITH ach AS (SELECT id FROM achievement WHERE symbol = cast(@symbol AS achievement_symbol_enum)),
|
||||
usr AS (SELECT id FROM "user" WHERE discord_id = @did)
|
||||
SELECT achievement_id FROM user_achievements_achievement, ach, usr WHERE user_id = usr.id and achievement_id = ach.id;
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user