# system.db.runNamedQuery \[tx\] syntax

**URL:** <https://forum.inductiveautomation.com/t/system-db-runnamedquery-tx-syntax/43390>\
**Category:** Ignition\
**Created:** [February 14, 2021, 1:51pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-tx-syntax/43390 "2021-02-14T13:51:31Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 14, 2021, 7:28pm UTC](https://forum.inductiveautomation.com/t/system-db-runnamedquery-tx-syntax/43390/6 "2021-02-14T19:28:17Z")

</div>

1. Well, it isn't convenient:

> [@Getting the context in which a function is running?](http://forum.inductiveautomation.com/t/getting-the-context-in-which-a-function-is-running/33977/3):
>
> However you check for scope, consider doing it at the top level of an inherited script module, setting booleans like isDesigner and isGateway. Then just check the booleans everywhere else. Something like this: try: isDesigner = bool(system.util.getSystemFlags() & system.util.DESIGNER\_FLAG) isGateway = False except AttributeError: isDesigner = False isGateway = True

1. [system.project.getProjectName()](https://docs.inductiveautomation.com/display/DOC81/system.project.getProjectName)

2. Depends on your JDBC driver and primary key column type(s).

---

_[View the full topic](https://forum.inductiveautomation.com/t/system-db-runnamedquery-tx-syntax/43390)._
