![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
gitlab.goalongtravels.com/open-source/couchdb-golang
A Golang library for CouchDB 2.x, inspired by CouchDB-Python.
func (d *Database) Query(fields []string, selector string, sorts []string, limit, skip, index interface{}) ([]map[string]interface{}, error)
You can query documents using a conditional selector statement in Golang. It will converts to the corresponding JSON query string.
For example:
docsQuery, err := movieDB.Query(nil, `year == 1989 && (director == "Ademir Kenovic" || director == "Dezs Garas")`, nil, nil, nil, nil)
equals to:
docsRaw, err := movieDB.QueryJSON(`
{
"selector": {
"year": 1989,
"$or": [
{ "director": "Ademir Kenovic" },
{ "director": "Dezs Garas" }
]
}
}`)
nor(condexprs...) matches if none of the conditions in condexprs match($nor). For example: nor(year == 1990, year == 1989, year == 1997) returns all documents whose year field not in 1989, 1990 and 1997.
all(field, array) matches an array value if it contains all the elements of the argument array($all). For example: all(genre, []string{"Comedy", "Short"} returns all documents whose genre field contains "Comedy" and "Short".
any(field, condexpr) matches an array field with at least one element meets the specified condition($elemMatch). For example: any(genre, genre == "Short" || genre == "Horror") returns all documents whose genre field contains "Short" or "Horror" or both.
exists(field, boolean) checks whether the field exists or not, regardless of its value($exists). For example: exists(director, false) returns all documents who does not have a director field.
typeof(field, type) checks the document field's type, valid types are "null", "boolean", "number", "string", "array", "object"($type). For example: typeof(genre, "array") returns all documents whose genre field is of array type.
in(field, array) the field must exist in the array provided($in). For example: in(director, []string{"Mike Portnoy", "Vitali Kanevsky"}) returns all documents whose director field is "Mike Portnoy" or "Vitali Kanevsky".
nin(field, array) the document field must not exist in the array provided($nin). For example: nin(year, []int{1990, 1992, 1998}) returns all documents whose year field is not in 1990, 1992 or 1998.
size(field, int) matches the length of an array field in a document($size). For example: size(genre, 2) returns all documents whose genre field is of length 2.
mod(field, divisor, remainder) matches documents where field % divisor == remainder($mod). For example: mod(year, 2, 1) returns all documents whose year field is an odd number.
regex(field, regexstr) a regular expression pattern to match against the document field. For example: regex(title, "^A") returns all documents whose title is begin with an "A".
asc(field) sorts the field in ascending order, this is the default option while desc(field) sorts the field in descending order.
go get -u -v github.com/leesper/couchdb-golang
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update unit tests as appropriate.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.