-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mongodb] Upgrade DB driver, add more type handlings, fix QuantityTyp…
…e handling (#16333) * #16308 #16310 Upgraded MongoDB driver, added initial unit tests * #16308 #16310 Refactored the MongoDBPersistence adding helper, fixing type handling for HSBType, RawType and QuantityType * #16308 Added backwardcompatibility for the old way of writting the data where possible * #16308 Added test for larger ImageItems and the limit of 16 MB Signed-off-by: René Ulbricht <rene_ulbricht@outlook.com>
- Loading branch information
Showing
11 changed files
with
2,427 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...istence.mongodb/src/main/java/org/openhab/persistence/mongodb/internal/MongoDBFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Copyright (c) 2010-2024 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.persistence.mongodb.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* This class defines constant field names used in MongoDB documents. | ||
* These field names are used to ensure consistent access to document properties. | ||
* | ||
* @author René Ulbricht - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public final class MongoDBFields { | ||
public static final String FIELD_ID = "_id"; | ||
public static final String FIELD_ITEM = "item"; | ||
public static final String FIELD_REALNAME = "realName"; | ||
public static final String FIELD_TIMESTAMP = "timestamp"; | ||
public static final String FIELD_VALUE = "value"; | ||
public static final String FIELD_UNIT = "unit"; | ||
public static final String FIELD_VALUE_DATA = "value.data"; | ||
public static final String FIELD_VALUE_TYPE = "value.type"; | ||
|
||
private MongoDBFields() { | ||
// Private constructor to prevent instantiation | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.