const class slanRecord::SqlUtil

sys::Obj
  slanRecord::SqlUtil

mapping model for database table. must has a prime key.

checkMatchDb

static Bool checkMatchDb(TableDef s, List<Col> tcols)

check model is match the database

checkMatchDbField

static Bool checkMatchDbField(FieldDef f, Col c)

check the column is match the database

colsToSchema

static TableDef colsToSchema(Str name, List<Col> cols)

convertParams

static List<Obj?>? convertParams(List<Obj?>? params)

getInstance

static Obj getInstance(TableDef s, ResultSet r)

fetch data

isPrimitiveType

static Bool isPrimitiveType(Type type)

log

const static Log log := SqlUtil#.pod().log

makeCacheKey

static Str makeCacheKey(TableDef s, Obj obj)

make string from object for cache key

removeLastChar

static StrBuf removeLastChar(StrBuf s)

toSqlStr

static Str toSqlStr(Obj? o)

convert object to sql string