[Gambas-user] how to override Exec if already inherist from colection (conection pool emulation)

Jussi Lahtinen jussi.lahtinen at gmail.com
Wed Jul 4 16:48:01 CEST 2018


Do you get any error messages?
I'm not familiar with the component, so I may not be able to help.


Jussi


On Wed, Jul 4, 2018 at 5:41 PM, PICCORO McKAY Lenz <mckaygerhard at gmail.com>
wrote:

> i done but i do not work, how to property override the exce?
>
> the code at gambas source are in C so override the exec must be like?
>
> Private Function _exec(query as String) As Resulset
>
>     ' how to obtain the current db object?
>     Try super.Open
>     ' i must retun a resul set, but then i onvike the super here?
>     return super.exec(query)
>
> End
>
> it's that code right?
>
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
>
> 2018-07-04 10:30 GMT-04:00 PICCORO McKAY Lenz <mckaygerhard at gmail.com>:
>
>>
>> 2018-07-04 10:24 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:
>>
>>> You don't need to make any inheritance tree, just one additional class,
>>> which is separated from the other classes.
>>>
>> yeah that's the problem more clases..  more files... more complicated
>>
>> i'm making right now..
>>
>>
>>>
>>>
>>> Jussi
>>>
>>> On Wed, Jul 4, 2018 at 5:15 PM, PICCORO McKAY Lenz <
>>> mckaygerhard at gmail.com> wrote:
>>>
>>>> 2018-07-04 10:06 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:
>>>>
>>>>> What is the downside? It's really short code and there isn't practical
>>>>> limit for number of classes.
>>>>>
>>>> No, the problem it's that code resulted will be too complicated to
>>>> newbie!
>>>>
>>>> i try to make very understable to new users and most simple as possible
>>>> the file tree of the proyect
>>>>
>>>> in the suggested behaviour, i will need make new tree with main clases
>>>> and parent clases.. must be like MVC now! will not look so simple
>>>>
>>>> well thanks any way jussi, now i know that are the only way!
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> Jussi
>>>>>
>>>>
>>>>
>>>>>
>>>>> On Wed, Jul 4, 2018 at 3:33 PM, PICCORO McKAY Lenz <
>>>>> mckaygerhard at gmail.com> wrote:
>>>>>
>>>>>> 2018-07-03 18:08 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:
>>>>>>
>>>>>>> Create new class that inherits connection. Do the overriding there
>>>>>>> and use the new class instead of the connection class.
>>>>>>>
>>>>>> GRRRRR dgod damn ok ok but then i need to do two inherits in
>>>>>> cascade!!!  conection->connection2-> and then collection->myclass and in my
>>>>>> clkass using the new connection.. seems too many classes  9.9u
>>>>>>
>>>>>> there-s some way to avoid that?
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Jussi
>>>>>>>
>>>>>>> On Wed, Jul 4, 2018 at 12:59 AM, PICCORO McKAY Lenz <
>>>>>>> mckaygerhard at gmail.com> wrote:
>>>>>>>
>>>>>>>> i already made my db pool emulation in rudimentary efforts..
>>>>>>>>
>>>>>>>> my class already inherits from collection, but now i wnats to
>>>>>>>> overrides the exec method of each stored connection, how to made it
>>>>>>>>
>>>>>>>> i attach the project
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Lenz McKAY Gerardo (PICCORO)
>>>>>>>> http://qgqlochekone.blogspot.com
>>>>>>>>
>>>>>>>>
>>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>>>>> ]----
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>>>> ]----
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>>> ]----
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>> ]----
>>>>>
>>>>>
>>>>
>>>>
>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>> ]----
>>>>
>>>>
>>>
>>>
>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>>
>>>
>>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180704/c59a7d20/attachment.html>


More information about the User mailing list