Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OQL all instances from a package

Tags:

jvm

oql

Is it possible in OQL to retrieve all the objects that belongs to a package? Or can I query with wildcards?

As @haridsv suggested I tried:

SELECT * from "com.example.*"

and

SELECT a from "com\.example\..*"

but in VisualVM it complaints that no such package exists.

Even

SELECT a from "java.io.File" a

Fails.

Thanks!

ssedano.

like image 308
ssedano Avatar asked Dec 06 '25 08:12

ssedano


1 Answers

You can use regular expression like this:

SELECT * from "<packagename>.*"

If the package name is "java.io" you would use:

SELECT * from "java\.io\..*"

Note the quotes around the regex and how the dots in the path are protected.

like image 111
haridsv Avatar answered Dec 11 '25 15:12

haridsv