🔍 findall
findall provides deep search utilities to locate entities without knowing their exact path.
1db.findall
Available Methods
1findall.User2findall.Channel3findall.Findchannel4findall.Content5findall.Findcontent
👤 findall.User(username)
Finds a user by ID using paginated scanning.
1await findall.User("alice@example.com");
Behavior
- Scans user pages sequentially
- Stops immediately when found
- Safe for very large datasets
📺 findall.Channel or findall.Findchannel (channelName, options)
Finds a channel across all users under a product. Uses ChannelManager for indexed channel lookup.
1await findall.Channel("Channel1", {2 productName: "HBH-CMS"3});
Response
1{2 success: true,3 data: {4 user: "alice@example.com",5 channel: "Channel1"6 }7}
Notes
- Channel names are normalized
- Stops on first match
- Uses
listall.Channelinternally
📝 findall.Content or 🆔 findall.Findcontent (contentID, options)
Finds a content item anywhere in the DB. Uses IDManager for indexed content lookup.
1await findall.Content("content-id-1", {2 productName: "HBH-CMS"3});
Behavior
-
Traverses:
User → Product → Channel → Content -
Auto-advances pagination
-
Stops early on match
1await findall.Findcontent("content-id-1", { productName: "HBH-CMS" });
Notes
- Direct ID resolution
- No filesystem scanning
- Most efficient content lookup method