Method Query_GetIdsWithAncestorsSql(string)
SQL for getting all IDs with their ancestors using recursive CTE.
Used by ToTreeListAsync to build parent chains.
PostgreSQL: WITH RECURSIVE parent_chain AS (...)
MSSQL: WITH parent_chain AS (...)
string Query_GetIdsWithAncestorsSql(string idsString)