collection

package
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) 2023 the go-mongr8 Authors and Contributors [@see Authors file]

Licensed under the MIT License (https://opensource.org/licenses/MIT)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpecsFromFields

func SpecsFromFields(fields []Field) []field.Spec

Types

type Collection

type Collection interface {
	Collection() Metadata
	Fields() []Field
	Indexes() []Index
}

Collection entity manages a single MongoDB collection

func NewCollection

func NewCollection(metadata Metadata, fields []Field, indexes []Index) Collection

type Field

type Field interface {
	Spec() *field.Spec
}

func FieldFromType

func FieldFromType(name string, _type field.FieldType) Field

func FieldsFromSpecs

func FieldsFromSpecs(arrFields *[]field.Spec) []Field

type Index

type Index interface {
	Spec() *index.Spec
}

type Metadata

type Metadata interface {
	Spec() *metadata.Spec
}

stores basic informations of a collection this also holds type of usage: collection or view

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL