Forum OpenACS Q&A: Database API

Posted by Luis Garcia on
I don't quite understand the logic in this query. This is use to return the content of a folder in the file storage package:

db_string select_folder_contents_count {}

the only thing present here is the statement-name; but there is no sql. How does it work? How does it go and get the content in a specific folder?


2: Re: Database API (response to 1)
Posted by John Sequeira on
The database API does a lookup to resolve the query identified by "select_folder_contents_count" based on what database you have chosen.

Take a look at the .XQL files that will have the same name as the file-storage tcl file being executed.  You'll see your query there.

I've found using emacs' tags function to bounce between code and SQL pretty helpful.