Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const result = await this.pool.query`
- INSERT INTO snapshots
- (
- user_id, room_id, tiktok_id, nickname, is_following, is_friend, is_new_gifter,
- is_moderator, is_subscriber, top_gifter_rank, gifter_level, following_count, follower_count
- )
- OUTPUT INSERTED.id
- VALUES
- (
- ${user_id},
- ${room_id},
- ${user["user_id"]},
- ${user['nickname']},
- ${parseBoolAsInt(user["is_following"])},
- ${parseBoolAsInt(user["is_friend"])},
- ${parseBoolAsInt(user["is_new_gifter"])},
- ${parseBoolAsInt(user["is_moderator"])},
- ${parseBoolAsInt(user["is_subscriber"])},
- ${user["top_gifter_rank"] == null ? null : parseInt('top_gifter_rank')},
- ${user['gifter_level']},
- ${user?.["info"]?.["following"]},
- ${user?.["info"]?.["followers"]}
- )
- `;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement