Package com.avaje.ebean

Source Code of com.avaje.ebean.TestRawSqlBuilderDistinct

package com.avaje.ebean;

import junit.framework.TestCase;

import org.junit.Assert;

import com.avaje.ebean.RawSql.Sql;

public class TestRawSqlBuilderDistinct extends TestCase {

  public void testDistinct() {

    RawSqlBuilder r = RawSqlBuilder.parse("select distinct id, name from t_cust");
    Sql sql = r.getSql();
    Assert.assertEquals("id, name", sql.getPreFrom());
    Assert.assertEquals("from t_cust", sql.getPreWhere());
    Assert.assertEquals("", sql.getPreHaving());
    Assert.assertNull(sql.getOrderBy());

  }

}
TOP

Related Classes of com.avaje.ebean.TestRawSqlBuilderDistinct

TOP
Copyright © 2018 www.massapi.com. 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.