_SimpleIndexA_UserInfo=`SELECT * FROM @user WHERE username=?`
_TopicA_DecrTagsById=`UPDATE @tag SET quote_num=quote_num-1, modified_on=? WHERE id IN (?)`
_TopicA_ExistTopicUser=`SELECT 1 FROM @topic_user WHERE user_id=? AND topic_id=? AND is_del=0`
_TopicA_FollowTags=`SELECT t.id id, t.user_id user_id, t.tag tag, t.quote_num quote_num, u.id "u.id", 1 as is_following, c.is_top, u.nickname "u.nickname", u.username "u.username", u.status "u.status", u.avatar "u.avatar", u.is_admin "u.is_admin" FROM @topic_user c JOIN @user u ON c.user_id = u.id JOIN @tag t ON c.topic_id = t.id WHERE c.is_del = 0 AND t.quote_num > 0 AND c.user_id=? ORDER BY c.is_top DESC, t.quote_num DESC LIMIT ? OFFSET ?`
_TopicA_FollowPinTags=`SELECT t.id id, t.user_id user_id, t.tag tag, t.quote_num quote_num, u.id "u.id", 1 as is_following, c.is_top, c.is_pin, u.nickname "u.nickname", u.username "u.username", u.status "u.status", u.avatar "u.avatar", u.is_admin "u.is_admin" FROM @topic_user c JOIN @user u ON c.user_id = u.id JOIN @tag t ON c.topic_id = t.id WHERE c.is_del = 0 AND t.quote_num > 0 AND c.user_id=? AND c.is_pin=1 ORDER BY c.is_top DESC, t.quote_num DESC LIMIT ? OFFSET ?`
_TopicA_FollowTags=`SELECT t.id id, t.user_id user_id, t.tag tag, t.quote_num quote_num, u.id "u.id", 1 as is_following, c.is_top, c.is_pin, u.nickname "u.nickname", u.username "u.username", u.status "u.status", u.avatar "u.avatar", u.is_admin "u.is_admin" FROM @topic_user c JOIN @user u ON c.user_id = u.id JOIN @tag t ON c.topic_id = t.id WHERE c.is_del = 0 AND t.quote_num > 0 AND c.user_id=? ORDER BY c.is_top DESC, t.quote_num DESC LIMIT ? OFFSET ?`
_TopicA_FollowTopic=`INSERT INTO @topic_user(user_id, topic_id, created_on) VALUES (?, ?, ?)`
_TopicA_HotTags=`SELECT t.id id, t.user_id user_id, t.tag tag, t.quote_num quote_num, u.id "u.id", u.nickname "u.nickname", u.username "u.username", u.status "u.status", u.avatar "u.avatar", u.is_admin "u.is_admin" FROM @tag t JOIN @user u ON t.user_id = u.id WHERE t.is_del = 0 AND t.quote_num > 0 ORDER BY t.quote_num DESC LIMIT ? OFFSET ?`
_TopicA_IncrTagsById=`UPDATE @tag SET quote_num=quote_num+1, is_del=0, modified_on=? WHERE id IN (?)`