mirror of
https://github.com/pikami/cosmium.git
synced 2024-11-28 08:27:37 +00:00
18 lines
597 B
Go
18 lines
597 B
Go
package repositories
|
|
|
|
import repositorymodels "github.com/pikami/cosmium/internal/repository_models"
|
|
|
|
var userDefinedFunctions = []repositorymodels.UserDefinedFunction{}
|
|
|
|
func GetAllUserDefinedFunctions(databaseId string, collectionId string) ([]repositorymodels.UserDefinedFunction, repositorymodels.RepositoryStatus) {
|
|
udfs := make([]repositorymodels.UserDefinedFunction, 0)
|
|
|
|
for _, coll := range userDefinedFunctions {
|
|
if coll.Internals.DatabaseId == databaseId && coll.Internals.CollectionId == collectionId {
|
|
udfs = append(udfs, coll)
|
|
}
|
|
}
|
|
|
|
return udfs, repositorymodels.StatusOk
|
|
}
|