fix: refs for cassandra db

This commit is contained in:
Lakhan Samani
2023-08-01 16:09:17 +05:30
parent 15a4be5431
commit c2defdbaac
47 changed files with 103 additions and 255 deletions

View File

@@ -41,14 +41,11 @@ func GetSetFields(webhookMap map[string]interface{}) (string, map[string]interfa
func (p *provider) GetTotalDocs(ctx context.Context, collection string) (int64, error) {
totalDocs := TotalDocs{}
countQuery := fmt.Sprintf("SELECT COUNT(*) as Total FROM %s.%s", p.scopeName, collection)
queryRes, err := p.db.Query(countQuery, &gocb.QueryOptions{
Context: ctx,
})
queryRes.One(&totalDocs)
if err != nil {
return totalDocs.Total, err
}