Giter Site home page Giter Site logo

yetonemorephpframework's People

Contributors

madpeterz avatar

Watchers

 avatar

Forkers

shadoskill

yetonemorephpframework's Issues

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".

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.

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)

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.

Cleaner load.

$asdertSet->matchs(["username"=>$asdasd,"password"=>$asdasdasd]);
This gets converted into whereConfig.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.