Database views

7 views
Skip to first unread message

Annick

unread,
May 14, 2020, 12:17:21 PM5/14/20
to glorp-group
Has anybody used database views with Glorp ?

jtuchel

unread,
May 14, 2020, 1:28:37 PM5/14/20
to glorp-group
No I haven't, but I'D expect them to work like tables. You can probably try to use read-only mappings, depending on your database, because some cannot write to views,

Since the SQL used to query a view does not differ from a select from a table, I don't see any reason for Glorp to encounter any problems. Apart from teh writing, of course.

Why not just do a CREATE VIEW and implement a class mapping just as you'd do for a table?


Joachim

Esteban Maringolo

unread,
May 14, 2020, 2:14:13 PM5/14/20
to GLORP Mailing List
I can confirm they work, but as Joachim says, read only. So any
attempt to modify the data there will cause an error when attempting
to commit.

I used that in the past to aggregate data on the database side (which
was 100x faster and lightweight) than doing it in the smalltalk side,
but I wanted to have an object on the Smalltalk side that I was able
to interact with.

Regards,

Esteban A. Maringolo
> --
> You received this message because you are subscribed to the Google Groups "glorp-group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to glorp-group...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/glorp-group/7e31d596-ee44-4ab6-8d05-8755f760b29e%40googlegroups.com.

Annick

unread,
Jun 4, 2020, 7:33:19 AM6/4/20
to glorp-group
Tahnk you both of you.


Le jeudi 14 mai 2020 20:14:13 UTC+2, Esteban Maringolo a écrit :
I can confirm they work, but as Joachim says, read only. So any
attempt to modify the data there will cause an error when attempting
to commit.

I used that in the past to aggregate data on the database side (which
was 100x faster and lightweight) than doing it in the smalltalk side,
but I wanted to have an object on the Smalltalk side that I was able
to interact with.

Regards,

Esteban A. Maringolo

On Thu, May 14, 2020 at 2:28 PM jtuchel <jtu...@objektfabrik.de> wrote:
>
> No I haven't, but I'D expect them to work like tables. You can probably try to use read-only mappings, depending on your database, because some cannot write to views,
>
> Since the SQL used to query a view does not differ from a select from a table, I don't see any reason for Glorp to encounter any problems. Apart from teh writing, of course.
>
> Why not just do a CREATE VIEW and implement a class mapping just as you'd do for a table?
>
>
> Joachim
>
>
> Am Donnerstag, 14. Mai 2020 18:17:21 UTC+2 schrieb Annick:
>>
>> Has anybody used database views with Glorp ?
>>
> --
> You received this message because you are subscribed to the Google Groups "glorp-group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to glorp...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages