Preupdate hook column name

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Preupdate hook column name

João Ramos
Hi,

I've successfully added support for the sqlite3_preupdate_hook(), but I
also need to get the column name when calling either
sqlite3_preupdate_old() or sqlite3_preupdate_new().
I know that I can obtain the type of the value of the column at index i by
calling sqlite3_value_type() but I also need the name of the column and I
can't find a way to do this.

Is this even possible?

Thank you,

--
*João Ramos*
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: [EXTERNAL] Preupdate hook column name

Hick Gunter
See pragma table_info;

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:[hidden email]] Im Auftrag von João Ramos
Gesendet: Donnerstag, 12. April 2018 20:54
An: SQLite mailing list <[hidden email]>
Betreff: [EXTERNAL] [sqlite] Preupdate hook column name

Hi,

I've successfully added support for the sqlite3_preupdate_hook(), but I also need to get the column name when calling either
sqlite3_preupdate_old() or sqlite3_preupdate_new().
I know that I can obtain the type of the value of the column at index i by calling sqlite3_value_type() but I also need the name of the column and I can't find a way to do this.

Is this even possible?

Thank you,

--
*João Ramos*
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: [EXTERNAL] Preupdate hook column name

João Ramos
I can't do that (execute other statements) inside a sqlite3_preupdate_hook
callback.

On Fri, Apr 13, 2018 at 6:50 AM, Hick Gunter <[hidden email]> wrote:

> See pragma table_info;
>
> -----Ursprüngliche Nachricht-----
> Von: sqlite-users [mailto:[hidden email]]
> Im Auftrag von João Ramos
> Gesendet: Donnerstag, 12. April 2018 20:54
> An: SQLite mailing list <[hidden email]>
> Betreff: [EXTERNAL] [sqlite] Preupdate hook column name
>
> Hi,
>
> I've successfully added support for the sqlite3_preupdate_hook(), but I
> also need to get the column name when calling either
> sqlite3_preupdate_old() or sqlite3_preupdate_new().
> I know that I can obtain the type of the value of the column at index i by
> calling sqlite3_value_type() but I also need the name of the column and I
> can't find a way to do this.
>
> Is this even possible?
>
> Thank you,
>
> --
> *João Ramos*
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___________________________________________
>  Gunter Hick | Software Engineer | Scientific Games International GmbH |
> Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O)
> +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>



--
*João Ramos*
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: [EXTERNAL] Preupdate hook column name

Hick Gunter
Then do it when connecting to the database

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:[hidden email]] Im Auftrag von João Ramos
Gesendet: Freitag, 13. April 2018 11:58
An: SQLite mailing list <[hidden email]>
Betreff: Re: [sqlite] [EXTERNAL] Preupdate hook column name

I can't do that (execute other statements) inside a sqlite3_preupdate_hook callback.

On Fri, Apr 13, 2018 at 6:50 AM, Hick Gunter <[hidden email]> wrote:

> See pragma table_info;
>
> -----Ursprüngliche Nachricht-----
> Von: sqlite-users
> [mailto:[hidden email]]
> Im Auftrag von João Ramos
> Gesendet: Donnerstag, 12. April 2018 20:54
> An: SQLite mailing list <[hidden email]>
> Betreff: [EXTERNAL] [sqlite] Preupdate hook column name
>
> Hi,
>
> I've successfully added support for the sqlite3_preupdate_hook(), but
> I also need to get the column name when calling either
> sqlite3_preupdate_old() or sqlite3_preupdate_new().
> I know that I can obtain the type of the value of the column at index
> i by calling sqlite3_value_type() but I also need the name of the
> column and I can't find a way to do this.
>
> Is this even possible?
>
> Thank you,
>
> --
> *João Ramos*
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___________________________________________
>  Gunter Hick | Software Engineer | Scientific Games International GmbH
> | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013
> | (O)
> +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>



--
*João Ramos*
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users