1
2 """
3 HQL plugin
4
5 Plugin read by omero.cli.Cli during initialization. The method(s)
6 defined here will be added to the Cli class for later use.
7
8 Copyright 2008 Glencoe Software, Inc. All rights reserved.
9 Use is subject to license terms supplied in LICENSE.txt
10
11 """
12
13 from omero.cli import CLI, BaseControl
14 import cmd, sys, exceptions
15 import sys
16
18
19 prompt = "omero hql [%s]> "
20
25
28
30
31 - def help(self, args = None):
32 self.ctx.out("""
33 Syntax: %(program_name)s hql param1=value1 param2=value2 select x from X ...
34
35 Executes an HQL statement with the given parameters.
36 If no query is given, then a shell is opened which
37 will run any entered query with the current parameters.
38 """)
39
47
48 try:
49 register("hql", HqlControl)
50 except NameError:
51 HqlControl()._main()
52