Any Problem?

Troubleshooting

Solve common issues when using pb-query.

Common Issues

Problem: Date comparisons not working

Fix: Always use Date objects:

pbQuery<Post>().between('created', new Date('2023-01-01'), new Date());

Performance Tips

Set Max Depth for TypeScript: By default, we infer types up to 6 levels deep. You can change this for each query.

For example, this is 3 levels deep:

// author.info.age
pbQuery<Post, 3>()
  .equal('author.info.age', 30)
  .and()
  .like('author.email', '%@example.com');
// author.info.age=30 && author.email~'%@example.com'