@@ -534,7 +534,7 @@ abstract public function analyzeCollection(string $collection): bool;
534534 * @throws TimeoutException
535535 * @throws DuplicateException
536536 */
537- abstract public function createAttribute (string $ collection , string $ id , string $ type , int $ size , bool $ signed = true , bool $ array = false ): bool ;
537+ abstract public function createAttribute (string $ collection , string $ id , string $ type , int $ size , bool $ signed = true , bool $ array = false , bool $ required = false ): bool ;
538538
539539 /**
540540 * Create Attributes
@@ -661,75 +661,75 @@ abstract public function deleteIndex(string $collection, string $id): bool;
661661 /**
662662 * Get Document
663663 *
664- * @param string $collection
664+ * @param Document $collection
665665 * @param string $id
666666 * @param array<Query> $queries
667667 * @param bool $forUpdate
668668 * @return Document
669669 */
670- abstract public function getDocument (string $ collection , string $ id , array $ queries = [], bool $ forUpdate = false ): Document ;
670+ abstract public function getDocument (Document $ collection , string $ id , array $ queries = [], bool $ forUpdate = false ): Document ;
671671
672672 /**
673673 * Create Document
674674 *
675- * @param string $collection
675+ * @param Document $collection
676676 * @param Document $document
677677 *
678678 * @return Document
679679 */
680- abstract public function createDocument (string $ collection , Document $ document ): Document ;
680+ abstract public function createDocument (Document $ collection , Document $ document ): Document ;
681681
682682 /**
683683 * Create Documents in batches
684684 *
685- * @param string $collection
685+ * @param Document $collection
686686 * @param array<Document> $documents
687687 *
688688 * @return array<Document>
689689 *
690690 * @throws DatabaseException
691691 */
692- abstract public function createDocuments (string $ collection , array $ documents ): array ;
692+ abstract public function createDocuments (Document $ collection , array $ documents ): array ;
693693
694694 /**
695695 * Update Document
696696 *
697- * @param string $collection
697+ * @param Document $collection
698698 * @param string $id
699699 * @param Document $document
700700 * @param bool $skipPermissions
701701 *
702702 * @return Document
703703 */
704- abstract public function updateDocument (string $ collection , string $ id , Document $ document , bool $ skipPermissions ): Document ;
704+ abstract public function updateDocument (Document $ collection , string $ id , Document $ document , bool $ skipPermissions ): Document ;
705705
706706 /**
707707 * Update documents
708708 *
709709 * Updates all documents which match the given query.
710710 *
711- * @param string $collection
711+ * @param Document $collection
712712 * @param Document $updates
713713 * @param array<Document> $documents
714714 *
715715 * @return int
716716 *
717717 * @throws DatabaseException
718718 */
719- abstract public function updateDocuments (string $ collection , Document $ updates , array $ documents ): int ;
719+ abstract public function updateDocuments (Document $ collection , Document $ updates , array $ documents ): int ;
720720
721721 /**
722722 * Create documents if they do not exist, otherwise update them.
723723 *
724724 * If attribute is not empty, only the specified attribute will be increased, by the new value in each document.
725725 *
726- * @param string $collection
726+ * @param Document $collection
727727 * @param string $attribute
728728 * @param array<Change> $changes
729729 * @return array<Document>
730730 */
731731 abstract public function createOrUpdateDocuments (
732- string $ collection ,
732+ Document $ collection ,
733733 string $ attribute ,
734734 array $ changes
735735 ): array ;
@@ -767,7 +767,7 @@ abstract public function deleteDocuments(string $collection, array $sequences, a
767767 *
768768 * Find data sets using chosen queries
769769 *
770- * @param string $collection
770+ * @param Document $collection
771771 * @param array<Query> $queries
772772 * @param int|null $limit
773773 * @param int|null $offset
@@ -776,10 +776,9 @@ abstract public function deleteDocuments(string $collection, array $sequences, a
776776 * @param array<string, mixed> $cursor
777777 * @param string $cursorDirection
778778 * @param string $forPermission
779- *
780779 * @return array<Document>
781780 */
782- abstract public function find (string $ collection , array $ queries = [], ?int $ limit = 25 , ?int $ offset = null , array $ orderAttributes = [], array $ orderTypes = [], array $ cursor = [], string $ cursorDirection = Database::CURSOR_AFTER , string $ forPermission = Database::PERMISSION_READ ): array ;
781+ abstract public function find (Document $ collection , array $ queries = [], ?int $ limit = 25 , ?int $ offset = null , array $ orderAttributes = [], array $ orderTypes = [], array $ cursor = [], string $ cursorDirection = Database::CURSOR_AFTER , string $ forPermission = Database::PERMISSION_READ ): array ;
783782
784783 /**
785784 * Sum an attribute
@@ -1029,6 +1028,34 @@ abstract public function getSupportForHostname(): bool;
10291028 */
10301029 abstract public function getSupportForBatchCreateAttributes (): bool ;
10311030
1031+ /**
1032+ * Is spatial attributes supported?
1033+ *
1034+ * @return bool
1035+ */
1036+ abstract public function getSupportForSpatialAttributes (): bool ;
1037+
1038+ /**
1039+ * Does the adapter support null values in spatial indexes?
1040+ *
1041+ * @return bool
1042+ */
1043+ abstract public function getSupportForSpatialIndexNull (): bool ;
1044+
1045+ /**
1046+ * Does the adapter support order attribute in spatial indexes?
1047+ *
1048+ * @return bool
1049+ */
1050+ abstract public function getSupportForSpatialIndexOrder (): bool ;
1051+
1052+ /**
1053+ * Does the adapter includes boundary during spatial contains?
1054+ *
1055+ * @return bool
1056+ */
1057+ abstract public function getSupportForBoundaryInclusiveContains (): bool ;
1058+
10321059 /**
10331060 * Get current attribute count from collection document
10341061 *
0 commit comments