Package railo.runtime.db

Examples of railo.runtime.db.SQLItem


   * @return
   * @throws PageException
   */
  private static Object toSQL(int sqlType, Object value, RefBoolean isArray) throws PageException {
    if(isArray!=null)isArray.setValue(false);
    SQLItem item = CommonUtil.toSQLItem(value,sqlType);
    try{
      return SQLCaster.toSqlType(item);
    }
    catch(PageException pe){
      // pherhaps it is a array of this type
View Full Code Here


      // array
      else if(CommonUtil.isArray(params)){
        Array arr=CommonUtil.toArray(params);
        Iterator it = arr.valueIterator();
        int index=0;
        SQLItem item;
        RefBoolean isArray=null;
        while(it.hasNext()){
          obj=it.next();
          if(obj instanceof SQLItem) {
            item=(SQLItem) obj;
            obj=item.getValue();
            //HibernateCaster.toHibernateType(item.getType(), null); MUST
            //query.setParameter(index, item.getValue(),type);
          }
          if(meta!=null){
            type = meta.getOrdinalParameterExpectedType(index+1);
View Full Code Here

  public static SQL convert(String sql, Array params) throws PageException{
    Iterator<Object> it = params.valueIterator();
    List<NamedSQLItem> namedItems=new ArrayList<NamedSQLItem>();
    List<SQLItem> items=new ArrayList<SQLItem>();
    Object value;
    SQLItem item;
    while(it.hasNext()){
      value = it.next();
      item=toSQLItem(value);
      if(item instanceof NamedSQLItem)
        namedItems.add((NamedSQLItem) item);
View Full Code Here

          }
          if(name.length()>0) {
            i=y-1;
            c='?';
           
            SQLItem p = get(name.toString(),namedItems);
            items.add(qm, p);
            qm++;
          }
         
        }
View Full Code Here

TOP

Related Classes of railo.runtime.db.SQLItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.