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

Tobias Boege taboege at gmail.com
Tue Jul 10 20:20:52 CEST 2018


On Tue, 10 Jul 2018, PICCORO McKAY Lenz wrote:
> i see teh observer in the wiki, if i made a observer of any
> connection? can cach the exec before ? override it?
> 
> see the code at gambas source are in C so override the exec must be like this?
> 
> 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
> 
> so then, it's that code right?

Observers catch events only, not method calls. An observer wouldn't see
anything related to Connection.Exec. There is no need to prefix the
method name with an underscore for overriding and Resulset isn't a
known class, you meant Result.

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list