Stored Procedures in Omnis Library
Thanks everyone for the ideas.
$userinfo tests out very well. We will be looking into this deeper.
For the text file solution, I wasn’t so concerned that someone would see the code, but rather it provides an opening for “outside influences” to mess up the data.
Text block didn’t like it. We are using type casting ( :: ), and Omnis thinks a formula is wrong.
> On Nov 3, 2017, at 9:24 AM, Scotte Meredith <email@example.com> wrote:
> You could have a class in the library and put it in the $userinfo for that class. You can put anything into $userinfo.
> Then pull it out in a string and execute it.
>> On Nov 3, 2017, at 8:33 AM, Alan Grinberg <firstname.lastname@example.org> wrote:
>> Hello all,
>> Using Postgres and Studio 6.
>> We have some complex stored procedures that we want to set up in a new PG database.
>> No problem doing this with PG Admin (and using Razor, too).
>> We want to put this code in our Omnis library so the user can trigger it when a new database is created.
>> The SQL is a large block of static text. (50+ lines)
>> What is the preferred way of storing this in the library?
>> 3 ideas so far:
>> 1. STA: (too cumbersome, SQL is already written)
>> 2. Copy text to an object method as comments, then extract the leading semi-colons
>> 3. Store the SQL in a record in the database by copy/paste (but requires our intervention)
>> 4. Read from a text file (not secure)
>> Any ideas out there?
>> Sorry I missed the conference. Sounds great.
>> Alan Grinberg
>> AG Systems/ZOO-INK
>> San Francisco, CA
>> www.zoo-ink.com <applewebdata://E01F3E44-AB72-4A7B-A459-57C700E4EAEF>
>> Manage your list subscriptions at lists.omnis-dev.com
> Scotte Meredith
> Manage your list subscriptions at lists.omnis-dev.com
Manage your list subscriptions at lists.omnis-dev.com