[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5725:
---------------------------------------
>> If marking the source schema as hidden causes too much extra work, you could consider using data roles to selectively control access.
How would this have to look like? Lets assume the scenario where a user should be able to call a virtual procedure which than calls a stored procedure. Further, the user should not be able to call the stored procedure directly.
If a user calls now calls the virtual procedure, would he than not need to have the same role assigned that is required to execute the stored procedure directly?
I do not understand how this than shell work.
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5725:
---------------------------------------
> Do I explicitly have to wrap my virtual procedures and functions which I write in the ddl file into a transaction?
It's up to you how much consistency you expect. The default behavior of the database is to auto commit on each statement. The default isolation level will vary by database. See https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-isolation-leve...
Under the auto-commit paradigm Teiid will create XA transactions when needed - if it appears that multiple accesses to transactional resources may be needed under a single user statement.
> And how would the command syntax for this look like?
In Teiid DDL if you want the statement to explicitly declare a transaction boundary the procedure syntax is:
begin atomic
...
end
See http://teiid.github.io/teiid-documents/master/content/reference/Procedure...
There are discussions of various implicit and user direct transactions under: http://teiid.github.io/teiid-documents/master/content/client-dev/Transact...
> My thinking is as follows; If I have a stored procedure or function in the source database, I would like to use it within my virtual procedures but at the same time would not like to allow access via odata. Would it be possible to add a visibility option to the procedure definition in the dll definition? Or does something similar already exist?
If marking the source schema as hidden causes too much extra work, you could consider using data roles to selectively control access.
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5727) Add bound functions and procedures to Teiid
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5727?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5727:
---------------------------------------
Hello Steven,
I am unfortunately not deep enough into the topic to tell if this is good or not. "some.type.name" would be the entity type to which the function is bound? Would this also work for entity collections in the mentioned case? My odata knowledge is to limited to tell if there would have to be a different behavior of entity collections.
At least my feeling says, that the proposed way would look easy for someone how has to implement the function.
> Add bound functions and procedures to Teiid
> -------------------------------------------
>
> Key: TEIID-5727
> URL: https://issues.jboss.org/browse/TEIID-5727
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Optional
>
> As far as I understood virtual procedures and functions are unbound only in the current implementation in Teiid. Would be nice if there would be a option to have bound (to entities and entity sets) procedures and functions as well.
> This would allow for some more syntactic sugar and would allow for a closer integration with libraries such as SAPUI5. See here for an example
> https://sapui5.netweaver.ondemand.com/sdk/#/topic/b54f7895b7594c61a83fa72...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5727) Add bound functions and procedures to Teiid
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5727?page=com.atlassian.jira.plugin... ]
Christoph John edited comment on TEIID-5727 at 4/22/19 4:55 PM:
----------------------------------------------------------------
Hello Steven,
I am unfortunately not deep enough into the topic to tell if this is good or not. "some.type.name" would be the entity type to which the function is bound? Would this also work for entity collections in the mentioned case? My odata knowledge is to limited to tell if there would have to be a different behavior for entity collections.
At least my feeling says, that the proposed way would look easy for someone how has to implement the function.
was (Author: cjohn001):
Hello Steven,
I am unfortunately not deep enough into the topic to tell if this is good or not. "some.type.name" would be the entity type to which the function is bound? Would this also work for entity collections in the mentioned case? My odata knowledge is to limited to tell if there would have to be a different behavior of entity collections.
At least my feeling says, that the proposed way would look easy for someone how has to implement the function.
> Add bound functions and procedures to Teiid
> -------------------------------------------
>
> Key: TEIID-5727
> URL: https://issues.jboss.org/browse/TEIID-5727
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Optional
>
> As far as I understood virtual procedures and functions are unbound only in the current implementation in Teiid. Would be nice if there would be a option to have bound (to entities and entity sets) procedures and functions as well.
> This would allow for some more syntactic sugar and would allow for a closer integration with libraries such as SAPUI5. See here for an example
> https://sapui5.netweaver.ondemand.com/sdk/#/topic/b54f7895b7594c61a83fa72...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5727) Add bound functions and procedures to Teiid
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5727?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5727:
---------------------------------------
Presumably this would look like:
create virtual procedure bound_proc () returns ... options ("teiid_odata:bound_type" "some.type.name") as ...
Such that an extension property would define the bound. We would then add a first parameter to the function/action to represent that bound.
Does that seem right to you?
> Add bound functions and procedures to Teiid
> -------------------------------------------
>
> Key: TEIID-5727
> URL: https://issues.jboss.org/browse/TEIID-5727
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Optional
>
> As far as I understood virtual procedures and functions are unbound only in the current implementation in Teiid. Would be nice if there would be a option to have bound (to entities and entity sets) procedures and functions as well.
> This would allow for some more syntactic sugar and would allow for a closer integration with libraries such as SAPUI5. See here for an example
> https://sapui5.netweaver.ondemand.com/sdk/#/topic/b54f7895b7594c61a83fa72...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Christoph John edited comment on TEIID-5725 at 4/22/19 3:53 PM:
----------------------------------------------------------------
Hello Steven,
I came up with a further question regarding virtual procedures. The question is related to transactions. Let's say I have multiple Teiid instances running which access the same mysql database, or alternatively other clients with direct access to the mysql database. Do I explicitly have to wrap my virtual procedures and functions which I write in the ddl file into a transaction? And how would the command syntax for this look like?
Further question regarding visibility of stored procedures and functions. I learned from a discussion with Ramesh, that there is a visibility attribute which I can set on the entire schema to set all tables and functions inaccessible. However, in that case I would have to wrap each table, I like to export to odata, into an additional view. This seems like odd extra work for me.
My thinking is the following. If I have a stored procedure or function in the source database, I would like to use it within my virtual procedures but at the same time would not like to allow access via odata. Would it be possible to add a visibility option to the procedure definition in the dll definition? Or does something similar already exist?
was (Author: cjohn001):
Hello Steven,
I came up with a further question regarding virtual procedures. The question is related to transactions. Let's say I have multiple Teiid instances running which access the same mysql database, or alternatively other clients with direct access to the mysql database. Do I explicitly have to wrap my virtual procedures and functions which I write in the ddl file into a transaction? And how would the command syntax for this look like?
Further question regarding visibility of stored procedures and functions. I learned from a discussion with Ramesh, that there is a visibility attribute which I can set on the entire schema to set all tables and functions inaccessible. However, in that case I would have to wrap each table I like to export to odata into a view, which seems like odd extra work for me.
My thinking is the following. If I have a stored procedure or function in the source database, I would like to use it within my virtual procedures but at the same time would not like to allow access via odata. Would it be possible to add a visibility option to the procedure definition in the dll definition? Or does something similar already exist?
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Christoph John edited comment on TEIID-5725 at 4/22/19 3:53 PM:
----------------------------------------------------------------
Hello Steven,
I came up with a further question regarding virtual procedures. The question is related to transactions. Let's say I have multiple Teiid instances running which access the same mysql database, or alternatively other clients with direct access to the mysql database. Do I explicitly have to wrap my virtual procedures and functions which I write in the ddl file into a transaction? And how would the command syntax for this look like?
Further question regarding visibility of stored procedures and functions. I learned from a discussion with Ramesh, that there is a visibility attribute which I can set on the entire schema to set all tables and functions inaccessible. However, in that case I would have to wrap each table, I like to export to odata, into an additional view. This seems like odd extra work for me.
My thinking is as follows; If I have a stored procedure or function in the source database, I would like to use it within my virtual procedures but at the same time would not like to allow access via odata. Would it be possible to add a visibility option to the procedure definition in the dll definition? Or does something similar already exist?
was (Author: cjohn001):
Hello Steven,
I came up with a further question regarding virtual procedures. The question is related to transactions. Let's say I have multiple Teiid instances running which access the same mysql database, or alternatively other clients with direct access to the mysql database. Do I explicitly have to wrap my virtual procedures and functions which I write in the ddl file into a transaction? And how would the command syntax for this look like?
Further question regarding visibility of stored procedures and functions. I learned from a discussion with Ramesh, that there is a visibility attribute which I can set on the entire schema to set all tables and functions inaccessible. However, in that case I would have to wrap each table, I like to export to odata, into an additional view. This seems like odd extra work for me.
My thinking is the following. If I have a stored procedure or function in the source database, I would like to use it within my virtual procedures but at the same time would not like to allow access via odata. Would it be possible to add a visibility option to the procedure definition in the dll definition? Or does something similar already exist?
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months