[Seasar-user:17681] Re: [dbflute-ignoreCase in conditionBean]使い方法

thomas [E-MAIL ADDRESS DELETED]
2009年 6月 10日 (水) 17:21:56 JST


Hai,

it uses like in SQL not ilike.


 EmployeemasterBhv.selectPage():paging()
DEBUG 2009-06-10 17:03:23,437
[http-8080-1]
======================================/
DEBUG 2009-06-10 17:03:23,437 [http-8080-1]
EmployeemasterListPage.prerender():154 --> EmployeemasterBhv.selectPage()
--> ...
DEBUG 2009-06-10 17:03:23,437 [http-8080-1]
論理的なコネクションを取得しました。tx=[FormatId=4360, GlobalId=1244620931796/5, BranchId=]
DEBUG 2009-06-10 17:03:23,437 [http-8080-1]
select dflocal.deleteflg as c1, dflocal.costrank as c2, dflocal.address1 as
c3, dflocal.address2 as c4, dflocal.postalcode as c5, dflocal.lastupdated as
c6, dflocal.employeecode as c7, dflocal.employeenamekanji as c8,
dflocal.employeenamekana as c9, dflocal.employeefirstname as c10,
dflocal.employeelastname as c11, dflocal.dob as c12, dflocal.age as c13,
dflocal.joiningdate as c14, dflocal.designation as c15, dflocal.joblevel as
c16, dflocal.yearofexperience as c17, dflocal.housephoneno as c18,
dflocal.mobilephoneno as c19, dflocal.email as c20, dflocal.terminationdate
as c21, dflocal.registerdate as c22
  from employeemaster dflocal
 where dflocal.employeecode like 'emp%' escape '|'
 offset 0 limit 10


Regards,
トマス


On Tue, Jun 9, 2009 at 8:03 PM, kubo <[E-MAIL ADDRESS DELETED]> wrote:

> Hello,
>
> Please confirm your SQL on console log.
> Does the SQL use 'ilike'?
> (where EMPLOYEE_CODE ilike 'emp%')
>
> 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>:
> > hai,
> >
> > I upgraded my dbflute to 0.9.5.
> >
> > EmployeemasterCB empCB = employeemasterBhv.newMyConditionBean();
> >         empCB.query().setEmployeecode_LikeSearch("emp", new
> > LikeSearchOption() {
> >             @Override
> >             public ExtensionOperand getExtensionOperand() {
> >                 return
> WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
> >             }
> >         }.likePrefix());
> >
> > if i give "emp" as search condition it retrieves only The values starts
> with
> > emp.
> >
> > InMy table i have the values
> >
> > emp22
> > EMP22
> > emp20
> > EMP20
> > .........
> > .........
> > ..........
> >
> > The above coding retrieves only emp22 and emp20
> > I want to retrieve EMP22 and EMP20 also.
> >
> >
> > Thanks
> > トマス
> >
> >
> >
> > 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>
> >>
> >> hai,
> >>
> >> Thanks for your helps!..
> >>
> >>
> >>
> >> On Tue, Jun 9, 2009 at 6:00 PM, kubo <[E-MAIL ADDRESS DELETED]> wrote:
> >>>
> >>> Hello,
> >>>
> >>> Sorry! I mistook your DBFlute version.
> >>> The method and class are supported since 0.9.5.
> >>> So please upgrade DBFlute to 0.9.5 if possible.
> >>>
> >>> 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>:
> >>> > hai,
> >>> >
> >>> > cb.query().setMemberName_
> >>> >>
> >>> >> LikeSearch("s", new LikeSearchOption() {
> >>> >>    @Override
> >>> >>    public ExtensionOperand getExtensionOperand() {
> >>> >>        return WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
> >>> >>    }
> >>> >> }.likePrefix());
> >>> >
> >>> > import org.seasar.dbflute.dbway.ExtensionOperand;//Error
> >>> >
> >>> > there is no class in org.seasar.dbflute.dbway like ExtensionOperand
> >>> >
> >>> >
> >>> >
> >>> > 2009/6/9 kubo <[E-MAIL ADDRESS DELETED]>
> >>> >>
> >>> >> Hello,
> >>> >>
> >>> >> Please watch this test case:
> >>> >> The method is 'test_likeSearch_caseInsensitive_Tx()'.
> >>> >>
> >>> >>
> >>> >>
> >>> >>
> https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-postgresql-example/src/test/java/com/example/dbflute/postgresql/dbflute/various/VendorCheckTest.java
> >>> >>
> >>> >> cb.query().setMemberName_LikeSearch("s", new LikeSearchOption() {
> >>> >>    @Override
> >>> >>    public ExtensionOperand getExtensionOperand() {
> >>> >>        return WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
> >>> >>    }
> >>> >> }.likePrefix());
> >>> >>
> >>> >> This code uses 'ilike' in the SQL.
> >>> >> (But this way is only available at PostgreSQL)
> >>> >>
> >>> >> If you have many many points that must be without case sensitive,
> >>> >> you should create CaseInsensitiveLikeSearchOption as your original
> >>> >> class.
> >>> >> Like this:
> >>> >>
> >>> >> public class CaseInsensitiveLikeSearchOption extends
> LikeSearchOption
> >>> >> {
> >>> >>    @Override
> >>> >>    public ExtensionOperand getExtensionOperand() {
> >>> >>        return WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
> >>> >>    }
> >>> >> }
> >>> >>
> >>> >> 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>:
> >>> >> > Hai,
> >>> >> >
> >>> >> > I am using PostgresQL 8.3
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > 2009/6/9 kubo <[E-MAIL ADDRESS DELETED]>
> >>> >> >>
> >>> >> >> Hello, this is jflute.
> >>> >> >>
> >>> >> >> For starters, there is one thing I want to confirm.
> >>> >> >> What kind of database do you use?
> >>> >> >> Oracle? MySQL? PostgreSQL? ...
> >>> >> >>
> >>> >> >> 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>:
> >>> >> >> > Hai,
> >>> >> >> >
> >>> >> >> > I want to retrieve data without case sensitive using condition
> >>> >> >> > Bean.
> >>> >> >> >
> >>> >> >> > dbflute version 0.9.4.1
> >>> >> >> >
> >>> >> >> > empCB.query().setEmployeecode_LikeSearch(empcodes,new
> >>> >> >> > LikeSearchOption());
> >>> >> >> >
> >>> >> >> > How to change this code to get case sensitive result?
> >>> >> >> >
> >>> >> >> > Please give steps to achieve this...
> >>> >> >> >
> >>> >> >> > Thanks in advance.
> >>> >> >> > トマス
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > _______________________________________________
> >>> >> >> > Seasar-user mailing list
> >>> >> >> > [E-MAIL ADDRESS DELETED]
> >>> >> >> > https://ml.seasar.org/mailman/listinfo/seasar-user
> >>> >> >> >
> >>> >> >> >
> >>> >> >> _______________________________________________
> >>> >> >> Seasar-user mailing list
> >>> >> >> [E-MAIL ADDRESS DELETED]
> >>> >> >> https://ml.seasar.org/mailman/listinfo/seasar-user
> >>> >> >
> >>> >> >
> >>> >> > _______________________________________________
> >>> >> > Seasar-user mailing list
> >>> >> > [E-MAIL ADDRESS DELETED]
> >>> >> > https://ml.seasar.org/mailman/listinfo/seasar-user
> >>> >> >
> >>> >> >
> >>> >> _______________________________________________
> >>> >> Seasar-user mailing list
> >>> >> [E-MAIL ADDRESS DELETED]
> >>> >> https://ml.seasar.org/mailman/listinfo/seasar-user
> >>> >
> >>> >
> >>> > _______________________________________________
> >>> > Seasar-user mailing list
> >>> > [E-MAIL ADDRESS DELETED]
> >>> > https://ml.seasar.org/mailman/listinfo/seasar-user
> >>> >
> >>> >
> >>> _______________________________________________
> >>> Seasar-user mailing list
> >>> [E-MAIL ADDRESS DELETED]
> >>> https://ml.seasar.org/mailman/listinfo/seasar-user
> >>
> >
> >
> > _______________________________________________
> > Seasar-user mailing list
> > [E-MAIL ADDRESS DELETED]
> > https://ml.seasar.org/mailman/listinfo/seasar-user
> >
> >
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20090610/a30ee523/attachment.html>


Seasar-user メーリングリストの案内