public class DAHelper extends Object
Constructor and Description |
---|
DAHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
count_(DATranscxt b,
String conn,
String t,
String field,
String v)
Deprecated.
replaced by
count(DATranscxt, String, String, Object...) |
static int |
count(DATranscxt b,
String conn,
String t,
Object... kvs) |
static Nyquence |
getNyquence(DATranscxt trb,
String conn,
io.odysz.semantics.meta.TableMeta m,
String nyqfield,
String... where_eqs) |
static long |
getValong(DATranscxt trb,
String conn,
io.odysz.semantics.meta.TableMeta m,
String field,
String... kvs) |
static String |
getValstr(io.odysz.transact.sql.Transcxt trb,
String conn,
io.odysz.semantics.meta.TableMeta m,
String valfield,
Object... kvs)
Load a field from table m.tbl.
|
static long |
loadRecLong(DATranscxt trb,
String conn,
io.odysz.semantics.meta.TableMeta m,
String recId,
String field)
Deprecated.
call
getValong(DATranscxt, String, TableMeta, String, String...) ,
e.g. getValong(t, m, target-field, m.pk, recId, ...). |
static Nyquence |
loadRecNyquence(DATranscxt trb,
String conn,
io.odysz.semantics.meta.TableMeta m,
String recId,
String field)
Deprecated.
|
static io.odysz.semantics.SemanticObject |
updateFieldByPk(DATranscxt trb,
String conn,
io.odysz.semantics.meta.TableMeta m,
String recId,
String field,
Object v,
io.odysz.semantics.IUser usr)
Commit to DB(
conn ) as user usr , with SQL:update m.tbl set field = v where m.pk = recId |
static io.odysz.semantics.SemanticObject |
updateFieldWhereEqs(DATranscxt trb,
String conn,
io.odysz.semantics.IUser usr,
io.odysz.semantics.meta.TableMeta m,
String field,
Object v,
Object... whereqs)
Commit to DB(
conn ) as user usr , with SQL:update m.tbl set field = v where whereqs[0] = whereqs[1] and whereqs[2] = whereqs[3] ... |
public static String getValstr(io.odysz.transact.sql.Transcxt trb, String conn, io.odysz.semantics.meta.TableMeta m, String valfield, Object... kvs) throws SQLException, io.odysz.transact.x.TransException
trb
- transaction builderconn
- m
- the table must have a pk.valfield
- kvs
- SQLException
io.odysz.transact.x.TransException
public static long loadRecLong(DATranscxt trb, String conn, io.odysz.semantics.meta.TableMeta m, String recId, String field) throws SQLException, io.odysz.transact.x.TransException
getValong(DATranscxt, String, TableMeta, String, String...)
,
e.g. getValong(t, m, target-field, m.pk, recId, ...).trb
- conn
- m
- recId
- field
- SQLException
io.odysz.transact.x.TransException
public static long getValong(DATranscxt trb, String conn, io.odysz.semantics.meta.TableMeta m, String field, String... kvs) throws SQLException, io.odysz.transact.x.TransException
SQLException
io.odysz.transact.x.TransException
public static Nyquence loadRecNyquence(DATranscxt trb, String conn, io.odysz.semantics.meta.TableMeta m, String recId, String field) throws SQLException, io.odysz.transact.x.TransException
getNyquence(DATranscxt, String, TableMeta, String, String...)
.trb
- conn
- m
- recId
- field
- SQLException
io.odysz.transact.x.TransException
public static Nyquence getNyquence(DATranscxt trb, String conn, io.odysz.semantics.meta.TableMeta m, String nyqfield, String... where_eqs) throws SQLException, io.odysz.transact.x.TransException
SQLException
io.odysz.transact.x.TransException
public static io.odysz.semantics.SemanticObject updateFieldByPk(DATranscxt trb, String conn, io.odysz.semantics.meta.TableMeta m, String recId, String field, Object v, io.odysz.semantics.IUser usr) throws io.odysz.transact.x.TransException, SQLException
conn
) as user usr
, with SQL:trb
- conn
- m
- recId
- field
- v
- usr
- io.odysz.transact.x.TransException
SQLException
public static io.odysz.semantics.SemanticObject updateFieldWhereEqs(DATranscxt trb, String conn, io.odysz.semantics.IUser usr, io.odysz.semantics.meta.TableMeta m, String field, Object v, Object... whereqs) throws io.odysz.transact.x.TransException, SQLException
conn
) as user usr
, with SQL:trb
- conn
- usr
- m
- field
- v
- whereqs
- io.odysz.transact.x.TransException
SQLException
public static int count_(DATranscxt b, String conn, String t, String field, String v) throws SQLException, io.odysz.transact.x.TransException
count(DATranscxt, String, String, Object...)
b
- conn
- t
- field
- v
- SQLException
io.odysz.transact.x.TransException
public static int count(DATranscxt b, String conn, String t, Object... kvs) throws SQLException, io.odysz.transact.x.TransException
SQLException
io.odysz.transact.x.TransException
Copyright © 2024. All rights reserved.