public class SqlHelper extends Object
ICS.SQL(String, String, String, int, boolean, boolean, StringBuffer)| Modifier and Type | Method and Description | 
|---|---|
static void | 
execute(COM.FutureTense.Interfaces.ICS ics,
       String table,
       String sql)
Executes sql statements, other then SELECT statements. 
 | 
static String | 
quote(String s)
Quote a string for use in a SQL statement. 
 | 
static IListIterable | 
select(COM.FutureTense.Interfaces.ICS ics,
      com.fatwire.cs.core.db.PreparedStmt stmt,
      com.fatwire.cs.core.db.StatementParam param)
Executes a PreparedStatement 
 | 
static IListIterable | 
select(COM.FutureTense.Interfaces.ICS ics,
      String table,
      String sql)
facade over ICS.SQL 
 | 
static IListIterable | 
select(COM.FutureTense.Interfaces.ICS ics,
      String table,
      String sql,
      int limit)
Executes an ICS.SQL operation with a limit. 
 | 
static IListIterable | 
selectSimplePrepared(COM.FutureTense.Interfaces.ICS ics,
                    String table,
                    String sql,
                    Object... value)
Executes a PreparedStatement in a simple form. 
 | 
static Row | 
selectSingle(COM.FutureTense.Interfaces.ICS ics,
            com.fatwire.cs.core.db.PreparedStmt stmt,
            com.fatwire.cs.core.db.StatementParam param)
Executes a PreparedStatement, returning a single row 
 | 
static Row | 
selectSingle(COM.FutureTense.Interfaces.ICS ics,
            String table,
            String sql)
Executes an ICS.SQL operation, returning a single Row, or null if no
 result was returned by ICS.SQL. 
 | 
static boolean | 
tableExists(COM.FutureTense.Interfaces.ICS ics,
           String table)  | 
public static final IListIterable select(COM.FutureTense.Interfaces.ICS ics, String table, String sql)
limit =-1;
bCache=true;
clears errno before ics.SQL
no IList registered in ics variable space
ics - Content Server context objecttable - tablenamesql - the sql statement, needs to start with 'select'RuntimeException - if errno is not zero or not -101select(ICS, String, String, int)public static final IListIterable select(COM.FutureTense.Interfaces.ICS ics, String table, String sql, int limit)
ics - Content Server context objecttable - tablenamesql - the sql statement, needs to start with 'select'limit - maximum number of rows to returnICS.SQL(String, String, String, int, boolean, StringBuffer)public static final void execute(COM.FutureTense.Interfaces.ICS ics,
                                 String table,
                                 String sql)
flushes the table (ics.FlushCatalog()) after the statement execution
ics - Content Server context objecttable - tablenamesql - the sql statement, can not start with "select"public static final IListIterable select(COM.FutureTense.Interfaces.ICS ics, com.fatwire.cs.core.db.PreparedStmt stmt, com.fatwire.cs.core.db.StatementParam param)
ics - Content Server context objectstmt - the PreparedStatementparam - the statement parameterspublic static final IListIterable selectSimplePrepared(COM.FutureTense.Interfaces.ICS ics, String table, String sql, Object... value)
ics - Content Server context objecttable - tablenamesql - the sql statementvalue - the values for the prepared statement parameters.public static final Row selectSingle(COM.FutureTense.Interfaces.ICS ics, com.fatwire.cs.core.db.PreparedStmt stmt, com.fatwire.cs.core.db.StatementParam param)
ics - the Content Server contextstmt - the PreparedStatementparam - the statement parameterspublic static final Row selectSingle(COM.FutureTense.Interfaces.ICS ics, String table, String sql)
ics - Content Server context objecttable - tablenamesql - the sql statement, needs to start with 'select'public static final String quote(String s)
s - string to quotepublic static boolean tableExists(COM.FutureTense.Interfaces.ICS ics,
                                  String table)
Copyright © 2016–2017. All rights reserved.