📄 hqlparsertest.java
字号:
parse( "from foo in class org.hibernate.test.Foo order by foo.string, foo.date" ); parse( "from foo in class org.hibernate.test.Foo where foo.class='B'" ); parse( "from foo in class org.hibernate.test.Foo where foo.class=Bar" ); parse( "select bar from bar in class org.hibernate.test.Bar, foo in class org.hibernate.test.Foo where bar.string = foo.string and not bar=foo" ); parse( "from foo in class org.hibernate.test.Foo where foo.string='foo bar'" ); parse( "select foo from foo in class org.hibernate.test.Foo" ); parse( "from bar in class org.hibernate.test.Bar where bar.barString='bar bar'" ); parse( "from t in class org.hibernate.test.Trivial" ); parse( "from foo in class org.hibernate.test.Foo where foo.date = ?" ); parse( "from o in class org.hibernate.test.MoreStuff" ); parse( "from o in class org.hibernate.test.Many" ); parse( "from o in class org.hibernate.test.Fee" ); parse( "from o in class org.hibernate.test.Qux" ); parse( "from o in class org.hibernate.test.Y" ); parse( "from o in class org.hibernate.test.Fumm" ); parse( "from o in class org.hibernate.test.X" ); parse( "from o in class org.hibernate.test.Simple" ); parse( "from o in class org.hibernate.test.Location" ); parse( "from o in class org.hibernate.test.Holder" ); parse( "from o in class org.hibernate.test.Part" ); parse( "from o in class org.hibernate.test.Baz" ); parse( "from o in class org.hibernate.test.Vetoer" ); parse( "from o in class org.hibernate.test.Sortable" ); parse( "from o in class org.hibernate.test.Contained" ); parse( "from o in class org.hibernate.test.Stuff" ); parse( "from o in class org.hibernate.test.Immutable" ); parse( "from o in class org.hibernate.test.Container" ); parse( "from o in class org.hibernate.test.X$XX" ); parse( "from o in class org.hibernate.test.One" ); parse( "from o in class org.hibernate.test.Foo" ); parse( "from o in class org.hibernate.test.Fo" ); parse( "from o in class org.hibernate.test.Glarch" ); parse( "from o in class org.hibernate.test.Fum" ); parse( "from q in class org.hibernate.test.Qux where q.stuff is null" ); parse( "from q in class org.hibernate.test.Qux where q.stuff=?" ); parse( "from q in class org.hibernate.test.Qux" ); parse( "from g in class org.hibernate.test.Glarch where g.version=2" ); parse( "from g in class org.hibernate.test.Glarch where g.next is not null" ); parse( "from g in class org.hibernate.test.Glarch order by g.order asc" ); parse( "from foo in class org.hibernate.test.Foo order by foo.string asc" ); parse( "select parent, child from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" ); parse( "select count(distinct child.id), count(distinct parent.id) from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" ); parse( "select child.id, parent.id, child.long from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" ); parse( "select child.id, parent.id, child.long, child, parent.foo from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" ); parse( "select parent, child from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child and parent.string='a string'" ); parse( "from fee in class org.hibernate.test.Fee" ); parse( "from org.hibernate.test.Foo foo where foo.custom.s1 = 'one'" ); parse( "from im in class org.hibernate.test.Immutable where im = ?" ); parse( "from foo in class org.hibernate.test.Foo" ); parse( "from foo in class org.hibernate.test.Foo where foo.char='X'" ); parse( "select elements(baz.stringArray) from baz in class org.hibernate.test.Baz" ); parse( "select distinct elements(baz.stringArray) from baz in class org.hibernate.test.Baz" ); parse( "select elements(baz.fooArray) from baz in class org.hibernate.test.Baz" ); parse( "from foo in class org.hibernate.test.Fo" ); parse( "from foo in class org.hibernate.test.Foo where foo.dependent.qux.foo.string = 'foo2'" ); parse( "from org.hibernate.test.Bar bar where bar.object.id = ? and bar.object.class = ?" ); parse( "select one from org.hibernate.test.One one, org.hibernate.test.Bar bar where bar.object.id = one.id and bar.object.class = 'O'" ); parse( "from l in class org.hibernate.test.Location where l.countryCode = 'AU' and l.description='foo bar'" ); parse( "from org.hibernate.test.Bar bar" ); parse( "From org.hibernate.test.Bar bar" ); parse( "From org.hibernate.test.Foo foo" ); parse( "from o in class org.hibernate.test.Baz" ); parse( "from o in class org.hibernate.test.Foo" ); parse( "from f in class org.hibernate.test.Foo" ); parse( "select fum.id from fum in class org.hibernate.test.Fum where not fum.fum='FRIEND'" ); parse( "select fum.id from fum in class org.hibernate.test.Fum where not fum.fum='FRIEND'" ); parse( "from fum in class org.hibernate.test.Fum where not fum.fum='FRIEND'" ); parse( "from fo in class org.hibernate.test.Fo where fo.id.string like 'an instance of fo'" ); parse( "from org.hibernate.test.Inner" ); parse( "from org.hibernate.test.Outer o where o.id.detailId = ?" ); parse( "from org.hibernate.test.Outer o where o.id.master.id.sup.dudu is not null" ); parse( "from org.hibernate.test.Outer o where o.id.master.id.sup.id.akey is not null" ); parse( "select o.id.master.id.sup.dudu from org.hibernate.test.Outer o where o.id.master.id.sup.dudu is not null" ); parse( "select o.id.master.id.sup.id.akey from org.hibernate.test.Outer o where o.id.master.id.sup.id.akey is not null" ); parse( "from org.hibernate.test.Outer o where o.id.master.bla = ''" ); parse( "from org.hibernate.test.Outer o where o.id.master.id.one = ''" ); parse( "from org.hibernate.test.Inner inn where inn.id.bkey is not null and inn.backOut.id.master.id.sup.id.akey > 'a'" ); parse( "from org.hibernate.test.Outer as o left join o.id.master m left join m.id.sup where o.bubu is not null" ); parse( "from org.hibernate.test.Outer as o left join o.id.master.id.sup s where o.bubu is not null" ); parse( "from org.hibernate.test.Outer as o left join o.id.master m left join o.id.master.id.sup s where o.bubu is not null" ); parse( "select fum1.fo from fum1 in class org.hibernate.test.Fum where fum1.fo.fum is not null" ); parse( "from fum1 in class org.hibernate.test.Fum where fum1.fo.fum is not null order by fum1.fo.fum" ); parse( "select elements(fum1.friends) from fum1 in class org.hibernate.test.Fum" ); parse( "from fum1 in class org.hibernate.test.Fum, fr in elements( fum1.friends )" ); parse( "select new Jay(eye) from org.hibernate.test.Eye eye" ); parse( "from org.hibernate.test.Category cat where cat.name='new foo'" ); parse( "from org.hibernate.test.Category cat where cat.name='new sub'" ); parse( "from org.hibernate.test.Up up order by up.id2 asc" ); parse( "from org.hibernate.test.Down down" ); parse( "from org.hibernate.test.Up up" ); parse( "from m in class org.hibernate.test.Master" ); parse( "from s in class org.hibernate.test.Several" ); parse( "from s in class org.hibernate.test.Single" ); parse( "\n" + " from d in class \n" + " org.hibernate.test.Detail\n" + " " ); parse( "from c in class org.hibernate.test.Category where c.name = org.hibernate.test.Category.ROOT_CATEGORY" ); parse( "select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where c.oneToMany[2] = s" ); parse( "select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where c.manyToMany[2] = s" ); parse( "select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where s = c.oneToMany[2]" ); parse( "select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where s = c.manyToMany[2]" ); parse( "select c from c in class org.hibernate.test.Container where c.oneToMany[0].name = 's'" ); parse( "select c from c in class org.hibernate.test.Container where c.manyToMany[0].name = 's'" ); parse( "select c from c in class org.hibernate.test.Container where 's' = c.oneToMany[2 - 2].name" ); parse( "select c from c in class org.hibernate.test.Container where 's' = c.manyToMany[(3+1)/4-1].name" ); parse( "select c from c in class org.hibernate.test.Container where c.manyToMany[ maxindex(c.manyToMany) ].count = 2" ); parse( "select c from c in class org.hibernate.test.Container where c.oneToMany[ c.manyToMany[0].count ].name = 's'" ); parse( "select c from org.hibernate.test.Container c where c.manyToMany[ c.oneToMany[0].count ].name = 's'" ); parse( "select count(comp.name) from org.hibernate.test.Container c join c.components comp" ); parse( "from org.hibernate.test.Parent p left join fetch p.child" ); parse( "from org.hibernate.test.Parent p join p.child c where c.x > 0" ); parse( "from org.hibernate.test.Child c join c.parent p where p.x > 0" ); parse( "from org.hibernate.test.Child" ); parse( "from org.hibernate.test.MoreStuff" ); parse( "from org.hibernate.test.Many" ); parse( "from org.hibernate.test.Fee" ); parse( "from org.hibernate.test.Qux" ); parse( "from org.hibernate.test.Fumm" ); parse( "from org.hibernate.test.Parent" ); parse( "from org.hibernate.test.Simple" ); parse( "from org.hibernate.test.Holder" ); parse( "from org.hibernate.test.Part" ); parse( "from org.hibernate.test.Baz" ); parse( "from org.hibernate.test.Vetoer" ); parse( "from org.hibernate.test.Sortable" ); parse( "from org.hibernate.test.Contained" ); parse( "from org.hibernate.test.Circular" ); parse( "from org.hibernate.test.Stuff" ); parse( "from org.hibernate.test.Immutable" ); parse( "from org.hibernate.test.Container" ); parse( "from org.hibernate.test.One" ); parse( "from org.hibernate.test.Foo" ); parse( "from org.hibernate.test.Fo" ); parse( "from org.hibernate.test.Glarch" ); parse( "from org.hibernate.test.Fum" ); parse( "from org.hibernate.test.Glarch g" ); parse( "from org.hibernate.test.Part" ); parse( "from org.hibernate.test.Baz baz join baz.parts" ); parse( "from c in class org.hibernate.test.Child where c.parent.count=66" ); parse( "from org.hibernate.test.Parent p join p.child c where p.count=66" ); parse( "select c, c.parent from c in class org.hibernate.test.Child order by c.parent.count" ); parse( "select c, c.parent from c in class org.hibernate.test.Child where c.parent.count=66 order by c.parent.count" ); parse( "select c, c.parent, c.parent.count from c in class org.hibernate.test.Child order by c.parent.count" ); parse( "FROM p IN CLASS org.hibernate.test.Parent WHERE p.count = ?" ); parse( "select count(*) from org.hibernate.test.Container as c join c.components as ce join ce.simple as s where ce.name='foo'" ); parse( "select c, s from org.hibernate.test.Container as c join c.components as ce join ce.simple as s where ce.name='foo'" ); parse( "from s in class org.hibernate.test.Simple" ); parse( "from m in class org.hibernate.test.Many" ); parse( "from o in class org.hibernate.test.One" ); parse( "from c in class org.hibernate.test.Container" ); parse( "from o in class org.hibernate.test.Child" ); parse( "from o in class org.hibernate.test.MoreStuff" ); parse( "from o in class org.hibernate.test.Many" ); parse( "from o in class org.hibernate.test.Fee" ); parse( "from o in class org.hibernate.test.Qux" ); parse( "from o in class org.hibernate.test.Fumm" ); parse( "from o in class org.hibernate.test.Parent" ); parse( "from o in class org.hibernate.test.Simple" ); parse( "from o in class org.hibernate.test.Holder" ); parse( "from o in class org.hibernate.test.Part" ); parse( "from o in class org.hibernate.test.Baz" ); parse( "from o in class org.hibernate.test.Vetoer" ); parse( "from o in class org.hibernate.test.Sortable" ); parse( "from o in class org.hibernate.test.Contained" ); parse( "from o in class org.hibernate.test.Circular" ); parse( "from o in class org.hibernate.test.Stuff" ); parse( "from o in class org.hibernate.test.Immutable" ); parse( "from o in class org.hibernate.test.Container" ); parse( "from o in class org.hibernate.test.One" ); parse( "from o in class org.hibernate.test.Foo" ); parse( "from o in class org.hibernate.test.Fo" ); parse( "from o in class org.hibernate.test.Glarch" ); parse( "from o in class org.hibernate.test.Fum" ); parse( "from c in class org.hibernate.test.C2 where 1=1 or 1=1" ); parse( "from b in class org.hibernate.test.B" ); parse( "from a in class org.hibernate.test.A" ); parse( "from b in class org.hibernate.test.B" ); parse( "from org.hibernate.test.E e join e.reverse as b where b.count=1" ); parse( "from org.hibernate.test.E e join e.as as b where b.count=1" ); parse( "from org.hibernate.test.B" ); parse( "from org.hibernate.test.C1" ); parse( "from org.hibernate.test.C2" ); parse( "from org.hibernate.test.E e, org.hibernate.test.A a where e.reverse = a.forward and a = ?" ); parse( "from org.hibernate.test.E e join fetch e.reverse" ); parse( "from org.hibernate.test.E e" ); parse( "select max(s.count) from s in class org.hibernate.test.Simple" ); parse( "select new org.hibernate.test.S(s.count, s.address) from s in class org.hibernate.test.Simple" ); parse( "select max(s.count) from s in class org.hibernate.test.Simple" ); parse( "select count(*) from s in class org.hibernate.test.Simple" ); parse( "from s in class org.hibernate.test.Simple where s.name=:name and s.count=:count" ); parse( "from s in class org.hibernate.test.Simple where s.name in (:several0_, :several1_)" ); parse( "from s in class org.hibernate.test.Simple where s.name in (:stuff0_, :stuff1_)" ); parse( "from org.hibernate.test.Simple s where s.name=?" ); parse( "from org.hibernate.test.Simple s where s.name=:name" ); parse( "from s in class org.hibernate.test.Simple where upper( s.name ) ='SIMPLE 1'" ); parse( "from s in class org.hibernate.test.Simple where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )" ); parse( "from s in class org.hibernate.test.Simple where lower( s.name || ' foo' ) ='simple 1 foo'" ); parse( "from s in class org.hibernate.test.Simple where upper( s.other.name ) ='SIMPLE 2'" ); parse( "from s in class org.hibernate.test.Simple where not ( upper( s.other.name ) ='SIMPLE 2' )" ); parse( "select distinct s from s in class org.hibernate.test.Simple where ( ( s.other.count + 3 ) = (15*2)/2 and s.count = 69) or ( ( s.other.count + 2 ) / 7 ) = 2" ); parse( "select s from s in class org.hibernate.test.Simple where ( ( s.other.count + 3 ) = (15*2)/2 and s.count = 69) or ( ( s.other.count + 2 ) / 7 ) = 2 order by s.other.count" ); parse( "select sum(s.count) from s in class org.hibernate.test.Simple group by s.count having sum(s.count) > 10" );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -