yetonemorephpframework's People
Forkers
shadoskillyetonemorephpframework's Issues
add support to invert objectToMappedArray ignoreFields
function objectToMappedArray for single objects
has ignore fields option, this should have support to invert it to only selected fields.
Load with config better checking
if you pass in a where config that has fields (not null or empty array)
it should check if the required field "fields" and "values" are set and return an error if missing
add support to load part data for objects
right now if you want to load data you have to load it all (filtered by where, order ect)
the request is to be able to select other fields to load.
fields not loaded will return null.
add + update functions will be disabled.
this would apply to both DB object and DB object sets.
$dbObject = new DBobject();
$dbObject->limitFields(["title"]); // only load the id and title fields
$dbObject->loadID(1);
$dbObjectSet = new DBobjectSet();
$dbObject->limitFields(["title"]); // only load the id and title fields
$dbObject->loadAll();
bulk update will be disabled when limtFields is set
Feature request.
Ability to set a object back to default values excluding "array of fields".
Add prefix support for cache for cheap multi domain
currently multi domain usage on the same host with the same redis could lead to issues with the "tables-lastchanged" being incorrect
There is no way to mark a where field as a function call.
currently if you want to use mysql functions as part of a whereConfig
you are out of luck.
example:
$whereConfig = [
"fields" => ["CHAR_LENGTH(excerpt)"],
"values" => [260],
"types" => ["i"],
"matches" => [">="],
];
as the code will transform it into a field leading to a field not found error.
maybe we could add a new config field
"asFunction" => [1]
any values you dont fill in for asFunction will auto fill to zero.
to allow function methods to be called without the need to break everything else.
Extend foreach support to single db objects
currently you can only foreach over a collection of single db objects, the plan is to extend this to single db objects
so you could do this
foreach($collection as $single)
{
foreach($single as $fieldname => $value)
{
}
}
Feature request.
Add option to ObjectToMappedArray of arg array to not return matching fields.
Better whereConfig.
Remove Types they are useless.
Make Matches optional and default to "="
add support for sets to call a SQL count
currently if you want a fast count reply you have to use the SQL interface
suggestion is to add support for the DB object set to have support for count (note: does not add any data to collection)
extend cache hash to 9 bits
Feature request.
bulkSet for non "Sets"
bulkSet takes a array of Field:Value and updates the object.
Update DB object functions
The current functions do not use whereConfig but the old style and should be updated.
loadLimited
loadOnFields
loadNewest
ModelFactory
the model factory is a mess and needs to be cleaned up (maybe even split over multiple files)
DBobjects/Set - Add function objectToMappedArray
$result = $set->objectToMappedArray(["fieldname1","fieldname2"]);
[
1 => [ Yname => Yvalue, Zname => Zvalue]
5 => [ Yname => Yvalue, Zname => Zvalue]
]
This should use the single objectToMappedArray with selected fields only.
Add DISTINCT option
Add DISTINCT option to select
Cleaner load.
$asdertSet->matchs(["username"=>$asdasd,"password"=>$asdasdasd]);
This gets converted into whereConfig.
expose redis / disk (get/set)
expose Redis / Disk (get/set) controls skipping the hash system for people
not using the DBobjects
Improve db objects set functions
currently sets do not have a helper for getObjectBy[Field] making you input the field name by hand as a string :(
getCollectionToMappedArray requires a array, should be default to empty array.
vendor\madpeterz\yetonemorephpframework\src\DbObjects\CollectionSet\CollectionSet.php
public function getCollectionToMappedArray(array $ignoreFields, bool $invertIgnore = false): array
to
public function getCollectionToMappedArray(array $ignoreFields = [], bool $invertIgnore = false): array
Alternate name for loadIds
For sets loadIds is really loadByValues as that name makes more sense.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.