Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

.QL

From Wikipedia, the free encyclopedia
Object-oriented query language
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This article includes alist of references,related reading, orexternal links,but its sources remain unclear because it lacksinline citations. Please helpimprove this article byintroducing more precise citations.(December 2012) (Learn how and when to remove this message)
The topic of this articlemay not meet Wikipedia'sgeneral notability guideline. Please help to demonstrate the notability of the topic by citingreliable secondary sources that areindependent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to bemerged,redirected, ordeleted.
Find sources: ".QL" – news ·newspapers ·books ·scholar ·JSTOR
(December 2012) (Learn how and when to remove this message)
(Learn how and when to remove this message)
.QL
Paradigmmulti-paradigm,logic-paradigm,object-oriented-paradigm
DeveloperSemmle
First appeared2007
Typing disciplinestatic,strong
Majorimplementations
SemmleCode
Influenced by
Datalog

.QL (pronounced "dot-cue-el") is an object-oriented query language used to retrieve data from relationaldatabase management systems. It is reminiscent of the standard query languageSQL and the object-oriented programming languageJava. .QL is an object-oriented variant of a logical query language calledDatalog. Hierarchical data can therefore be naturally queried in .QL in a recursive manner.

Queries written in .QL are optimised, compiled into SQL and can then be executed on any major relational database management system. .QL query language is being used inSemmleCode to query a relational representation of Java programs.

.QL is developed at Semmle Limited and is based on the company's proprietary technology.

Language features

[edit]

.QL has several language features to make queries concise, intuitive and reusable:

  • Extensible type hierarchy
  • Methods and predicates
  • Definition before use

Example query

[edit]

The sample query below illustrates use of .QL to query a Java program. This is how one would select all classes that contain more than ten public methods:

fromClassc,intnumOfMethodswherenumOfMethods=count(Methodm|m.getDeclaringType()=candm.hasModifier("public"))andnumOfMethods>10selectc.getPackage(),c,numOfMethods

In fact, this query selects not only all classes with more than ten public methods, but also their corresponding packages and the number of methods each class has.

See also

[edit]
  • OQL (Object Query Language)

References

[edit]
  • Hervé Gallaire and Jack Minker. Logic and Databases. Plenum Press, New York,1978.
  • Serge Abiteboul and Paris C. Kanellakis. Object identity as a query language primitive. In SIGMOD Rec, pages 159–173, ACM Press, 1989.
  • Oege de Moor, Elnar Hajiyev and Mathieu Verbaere. Object-oriented queries over software systems. In Proceedings of the 2007 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation (PEPM), page 91, ACM Press, 2007.

External links

[edit]
In current use
Proprietary
Superseded
Retrieved from "https://en.wikipedia.org/w/index.php?title=.QL&oldid=1337693894"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp