📃 listall
listall is used to list entities across hierarchy levels using safe pagination traversal.
1db.listall
Available Methods
1listall.User2listall.Channel3listall.Content
👤 listall.User(options)
Lists users using paginated traversal.
1await listall.User({2 userPage: 1,3 userLimit: 104});
Parameters
| Name | Type | Description |
|---|---|---|
userPage |
Number | Page number (example: 1) |
userLimit |
Number | Users per page (example: 10) |
Response
1{2 success: true,3 message: "Users fetched",4 data: [ "alice@example.com", "bob@example.com" ],5 pagination: { userPage: 1, userLimit: 10 }6}
Notes
- Internally uses
UserDB.list() - Safe for large datasets
- No eager filesystem traversal
📺 listall.Channel(options)
Lists channels across all users under a given product.
1await listall.Channel({2 productName: "HBH-CMS",3 userPage: 1,4 userLimit: 10,5 channelPage: 1,6 channelLimit: 107});
Parameters
| Name | Description |
|---|---|
productName |
Product scope (example: "HBH-CMS") |
userPage |
User pagination (example: 1) |
userLimit |
Users per page (example: 10) |
channelPage |
Channel pagination (example: 1) |
channelLimit |
Channels per page (example: 10) |
Response
1{2 success: true,3 data: {4 "alice@example.com": ["Channel1", "Channel2"],5 "bob@example.com": ["News"]6 }7}
Notes
- Traverses User → Product → Channel
- Channel names are normalized
- Errors per user are safely skipped
📝 listall.Content(options)
Lists content across users, channels, and content types.
1await listall.Content({2 productName: "HBH-CMS",3 userPage: 1,4 userLimit: 10,5 channelPage: 1,6 channelLimit: 10,7 contentPage: 1,8 contentLimit: 209});
Response
1{2 success: true,3 data: {4 "content-id-1": { user: "alice@example.com", channel: "Channel1" },5 "content-id-2": { user: "bob@example.com", channel: "News" }6 }7}
Notes
- Traverses entire DB hierarchy
- Content types are auto-detected
- Designed for CMS indexing