agentejo / mongo-lite Goto Github PK
View Code? Open in Web Editor NEWSchemaless database on top of SQLite
Schemaless database on top of SQLite
First of all, sorry for my bad english (i'll try explain me) and thank you for this nice project, is very useful.
I'm trying delete some fields in a document, but when I execute "save" function with a new array including some fields erased and others added, the sql script only merge original json from DB with all new ones values added by me but no delete it.
How I could do this?
create_function
in Database.php on line 82
deprecated in php 7.2
I try to use anomymous function, but i suck ๐ก
:: edit
$this->document_criterias[$id] = function($document) use ($criteria) {
$str = UtilArrayQuery::buildCondition($criteria);
return eval("return $str;");
};
quick fix :)
Hey Artur,
when one inserts a single entry to the DB, the insert method (which delegates to _insert) in the Collection.php returns the internal sqlite-ID of the new entry instead of the generated ID ($document['_id'] = isset($document['_id']) ? $document['_id'] : createMongoDbLikeId();
).
Could the insert method please return the generated ID or is there a reason why the internal ID (which seems unused) is returned?
friendly regards
tell me, how do I close the database with a password?
in documentation is not described, how to do it
I started working on functionality to populate a document with another sub document. Currently oneToMany and ManyToMany scenario's are supported.
A document can be populated using the following method. The first argument is the property of the document you want to populate. The second argument is the name of the collection used to populate the document.
$collection->find()->populate("categories", "categories")->toArray();
For now only one level of population is supported. Everything is contained within the following commit: StevenDevooght@aefaee6
Hello @aheinze
Thanks for this enjoyable project... ๐
I was thinking if anybody is working on a ServiceProvider of MongoLite for Silex microframework... I ask for this because I will work in that project and maybe is usefull for somebody else...
Happy coding...
PS: I don't know how to mark this issue just as a "Enhancement" ๐
Hello,
You are saying this is for small projects. Can I ask how small? Can you please give some numbers?
And the important one. How can I query for a json-object nested in an array and how?
Thank you very much for this incredible schemaless database.
Prompt, as in certain collections can I specify numeric id (AUTO INCREMENT) ?
hi
thanks for the good job
is it possible to using it with require way?
i like to keep my file structure clean and nice looking
how i can use it without vendor/autoload method?
tell me how after use
$collection->insert($document);
I can in callback get an ID saved document?
tell me how I can get the count of documents in the collection, not the full selected?
eg
the documentation is an example
$products = $collection->find();
$products->count()
so on large volumes of data will be noticeable brake
there is some variant like this?
$collection->count();
ie, in SQL, this query would look like this
select count(id) from table_name
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.