package db import "xorm.io/xorm" func QueryNativeString(Db *xorm.Engine, sql string, args ...interface{}) ([]map[string]string, error) { results, err := Db.SQL(sql, args...).QueryString() return results, err } func QueryNativeStringSess(sess *xorm.Session, sql string, args ...interface{}) ([]map[string]string, error) { results, err := sess.SQL(sql, args...).QueryString() return results, err } // InsertCommWithSession common insert func InsertCommWithSession(session *xorm.Session, model interface{}) (int64, error) { row, err := session.InsertOne(model) return row, err }