nalgeon / sqlean

The ultimate set of SQLite extensions
MIT License
3.65k stars 115 forks source link

fileio: Parse error: no such function #98

Closed avinashkurup closed 10 months ago

avinashkurup commented 10 months ago

Hi, I have statically built the fileio extension with the amalgamation sqlite sources. I find that many functions when called from the CLI, error out as they are not resolved. Could you tell me why some functions work while others are not resolved? (Note: I create .o from the fileio extension and link them into a c-archive .a file which is linked to the sqlite executable).

SQLite version 3.43.2 2023-10-10 12:14:04 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .open junkdb-sqlite.db sqlite> select lsmod('.'); Parse error: no such function: lsmod select lsmod('.'); ^--- error here sqlite> select fileio_read('test_write_file2.txt'); Parse error: no such function: fileio_read select fileio_read('test_write_file2.txt'); ^--- error here sqlite> select readfile('test_write_file2.txt'); < --- this worked. test content

Similarly, sqlite> select fileio_ls('test_write_file2.txt');
Parse error: no such function: fileio_ls select fileio_ls('test_write_file2.txt'); ^--- error here

but...

sqlite> select lsdir('test_write_file2.txt'); Parse error: no such function: lsdir select lsdir('test_write_file2.txt'); ^--- error here