While it is technically possible to convincingly fake an SQLite context to call strftimeFunc() with, it also means that you are ignoring SQLite function overloading. And making yourself dependant on internal changes to SQLite structures that are opaque for a reason.
-----Urspr?ngliche Nachricht----- Von: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] Im Auftrag von Olivier Mascia Gesendet: Mittwoch, 30. M?rz 2016 20:05 An: SQLite mailing list Betreff: [sqlite] Calling some predefined SQL function from another custom SQL function? Hello, Writing a scalar SQL function, is there a C-level way to call some other scalar SQL function? For instance, writing some specialized date_xyz(), could it be possible to prepare some arguments and call strftime()? I see in the code that strftimeFunc() is the implementation for the predefined strftime(), and I see no huge difficulty calling it from my own function, but of course it is internal (static). Did I miss something in the API that would let me get a hand on it? Something like some 'sqlite3_call_function(...)' which would take the function name as text and let me hand it the context, count of arguments, array of them, and return me somehow a sqlite_value with the result? I think it is obvious I could build a SQL statement from within the function and execute it. But it sounds costly to involve the parser (yes, it's fast) for that, isn't it? -- Meilleures salutations, Met vriendelijke groeten, Best Regards, Olivier Mascia, integral.be/om _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: hick at scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.