onlyDefaultCollection is true if the database is only configured with default collection.
()
| 2183 | |
| 2184 | // onlyDefaultCollection is true if the database is only configured with default collection. |
| 2185 | func (dbCtx *DatabaseContext) OnlyDefaultCollection() bool { |
| 2186 | if len(dbCtx.CollectionByID) > 1 { |
| 2187 | return false |
| 2188 | } |
| 2189 | _, exists := dbCtx.CollectionByID[base.DefaultCollectionID] |
| 2190 | return exists |
| 2191 | } |
| 2192 | |
| 2193 | // hasDefaultCollection is true if the database is configured with default collection |
| 2194 | func (dbCtx *DatabaseContext) HasDefaultCollection() bool { |
no outgoing calls