data

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

API Contains all the builders required to access the weaviate data API

func New

func New(con *connection.Connection) *API

New {semanticKind} api group from connection

func (*API) Creator

func (data *API) Creator() *Creator

Creator get a builder to create a data object

func (*API) Deleter

func (data *API) Deleter() *Deleter

Deleter get a builder to delete data objects

func (*API) ObjectsGetter added in v1.1.1

func (data *API) ObjectsGetter() *ObjectsGetter

ObjectsGetter get a builder to get an Action

func (*API) ReferenceCreator

func (data *API) ReferenceCreator() *ReferenceCreator

ReferenceCreator get a builder to add references to data objects

func (*API) ReferenceDeleter

func (data *API) ReferenceDeleter() *ReferenceDeleter

ReferenceDeleter get a builder to delete references on a data object

func (*API) ReferencePayloadBuilder

func (data *API) ReferencePayloadBuilder() *ReferencePayloadBuilder

ReferencePayloadBuilder get a builder to create the payloads that reference an object

func (*API) ReferenceReplacer

func (data *API) ReferenceReplacer() *ReferenceReplacer

ReferenceReplacer get a builder to replace references on a data object

func (*API) Updater

func (data *API) Updater() *Updater

Updater get a builder to update a data object

func (*API) Validator

func (data *API) Validator() *Validator

Validator get a builder to validate a data object definition

type Creator

type Creator struct {
	// contains filtered or unexported fields
}

Creator builder to create a data object in weaviate

func (*Creator) Do

func (creator *Creator) Do(ctx context.Context) (*ObjectWrapper, error)

Do create the data object as specified in the builder

func (*Creator) PayloadObject added in v1.1.1

func (creator *Creator) PayloadObject() (*models.Object, error)

PayloadObject returns the data object payload which may be used in a batch request

func (*Creator) WithClassName

func (creator *Creator) WithClassName(name string) *Creator

WithClassName indicates what class the data object is associated with

func (*Creator) WithID

func (creator *Creator) WithID(uuid string) *Creator

WithID if specified the object will be created under this uuid weaviate will generate a uuid if this was not called or an empty string is specified.

func (*Creator) WithProperties added in v1.1.1

func (creator *Creator) WithProperties(propertySchema models.PropertySchema) *Creator

WithProperties property values of the data object

type Deleter

type Deleter struct {
	// contains filtered or unexported fields
}

Deleter builder to delete a data object

func (*Deleter) Do

func (deleter *Deleter) Do(ctx context.Context) error

Do delete the specified data object from weaviate

func (*Deleter) WithID

func (deleter *Deleter) WithID(uuid string) *Deleter

WithID specifies the uuid of the object about to be deleted

type ObjectWrapper

type ObjectWrapper struct {
	Object *models.Object
}

ObjectWrapper wrapping the result of a creation for both actions and things

type ObjectsGetter added in v1.1.1

type ObjectsGetter struct {
	// contains filtered or unexported fields
}

ObjectsGetter Builder to retrieve Things from weaviate

func (*ObjectsGetter) Do added in v1.1.1

func (getter *ObjectsGetter) Do(ctx context.Context) ([]*models.Object, error)

Do get the data object

func (*ObjectsGetter) WithAdditional added in v1.1.1

func (getter *ObjectsGetter) WithAdditional(additional string) *ObjectsGetter

WithAdditional parameters such as for example: classification, featureProjection

func (*ObjectsGetter) WithID added in v1.1.1

func (getter *ObjectsGetter) WithID(id string) *ObjectsGetter

WithID specifies the uuid of the Thing that should be retrieved

if omitted a set of objects matching the builder specifications will be retrieved

func (*ObjectsGetter) WithLimit added in v1.1.1

func (getter *ObjectsGetter) WithLimit(limit int) *ObjectsGetter

WithLimit of results

func (*ObjectsGetter) WithVector added in v1.1.1

func (getter *ObjectsGetter) WithVector() *ObjectsGetter

WithVector include the raw vector of the data object

type ReferenceCreator

type ReferenceCreator struct {
	// contains filtered or unexported fields
}

ReferenceCreator builder to add a reference to the property of a data object

func (*ReferenceCreator) Do

func (rc *ReferenceCreator) Do(ctx context.Context) error

Do add the reference specified by the set payload to the object and property specified in the builder.

func (*ReferenceCreator) WithID

func (rc *ReferenceCreator) WithID(uuid string) *ReferenceCreator

WithID specifies the uuid of the object on which to add the reference

func (*ReferenceCreator) WithReference

func (rc *ReferenceCreator) WithReference(referencePayload *models.SingleRef) *ReferenceCreator

WithReference specifies the data object that should be referenced by the in this object specified reference property The payload may be created using the ReferencePayloadBuilder

func (*ReferenceCreator) WithReferenceProperty

func (rc *ReferenceCreator) WithReferenceProperty(propertyName string) *ReferenceCreator

WithReferenceProperty specifies the property that should hold the reference

type ReferenceDeleter

type ReferenceDeleter struct {
	// contains filtered or unexported fields
}

ReferenceDeleter builder to remove a reference from a data object

func (*ReferenceDeleter) Do

func (rr *ReferenceDeleter) Do(ctx context.Context) error

Do remove the reference defined by the payload set in this builder to the property and object defined in this builder

func (*ReferenceDeleter) WithID

func (rr *ReferenceDeleter) WithID(uuid string) *ReferenceDeleter

WithID specifies the uuid of the object on which the reference will be deleted

func (*ReferenceDeleter) WithReference

func (rr *ReferenceDeleter) WithReference(referencePayload *models.SingleRef) *ReferenceDeleter

WithReference specifies reference payload of the reference about to be deleted

func (*ReferenceDeleter) WithReferenceProperty

func (rr *ReferenceDeleter) WithReferenceProperty(propertyName string) *ReferenceDeleter

WithReferenceProperty specifies the property on which the reference should be deleted

type ReferencePayloadBuilder

type ReferencePayloadBuilder struct {
	// contains filtered or unexported fields
}

ReferencePayloadBuilder to create a payload that references a data object. The payload may be added to a reference property in another data object.

func (*ReferencePayloadBuilder) Payload

func (rpb *ReferencePayloadBuilder) Payload() *models.SingleRef

Payload to reference the in the builder specified data object

func (*ReferencePayloadBuilder) WithID

WithID specifies the uuid of the object to be referenced

type ReferenceReplacer

type ReferenceReplacer struct {
	// contains filtered or unexported fields
}

ReferenceReplacer builder to replace reference(s) with new one(s)

func (*ReferenceReplacer) Do

func (rr *ReferenceReplacer) Do(ctx context.Context) error

Do replace the references of the in this builder specified data object

func (*ReferenceReplacer) WithID

func (rr *ReferenceReplacer) WithID(uuid string) *ReferenceReplacer

WithID specifies the uuid of the object about to get its reference replaced

func (*ReferenceReplacer) WithReferenceProperty

func (rr *ReferenceReplacer) WithReferenceProperty(propertyName string) *ReferenceReplacer

WithReferenceProperty specifies the property that should replace

func (*ReferenceReplacer) WithReferences

func (rr *ReferenceReplacer) WithReferences(referencePayload *models.MultipleRef) *ReferenceReplacer

WithReferences the set of references that should replace the currently existing references

type Updater

type Updater struct {
	// contains filtered or unexported fields
}

Updater builder to update property values in a data object

func (*Updater) Do

func (updater *Updater) Do(ctx context.Context) error

Do update the data object specified in the builder

func (*Updater) WithClassName

func (updater *Updater) WithClassName(className string) *Updater

WithClassName specifies the class of the object about to be updated

func (*Updater) WithID

func (updater *Updater) WithID(uuid string) *Updater

WithID specifies the uuid of the object about to be updated

func (*Updater) WithMerge

func (updater *Updater) WithMerge() *Updater

WithMerge indicates that the object should be merged with the existing object instead of replacing it

func (*Updater) WithProperties added in v1.1.1

func (updater *Updater) WithProperties(propertySchema models.PropertySchema) *Updater

WithProperties specifies the property schema of the class about to be updated

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator builder object to validate a class

func (*Validator) Do

func (validator *Validator) Do(ctx context.Context) error

Do validate the data object specified in the builder Will return an error if the object is not valid or if there is a different error

func (*Validator) WithClassName

func (validator *Validator) WithClassName(className string) *Validator

WithClassName specifies the class of the object about to be validated

func (*Validator) WithID

func (validator *Validator) WithID(uuid string) *Validator

WithID specifies the uuid of the object about to be validated

func (*Validator) WithSchema

func (validator *Validator) WithSchema(propertySchema models.PropertySchema) *Validator

WithSchema specifies the property schema of the class about to be validated

Jump to

Keyboard shortcuts

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