Letractively / add-mvc-framework

Automatically exported from code.google.com/p/add-mvc-framework
0 stars 0 forks source link

Unlimited query should be less accessible to prevent mistake #150

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Description Of This Idea:
The "get all rows"  by passing blank value on $per_page of 
get_where_order_page() should be less accessible maybe there should be a 
default maximum on the config

{{{
$C = (object) array(
#...
'max_rows' => 2000, #(for unli)
);
}}}

{{{
$C = (object) array(
#...
'max_rows' => null, #(for unli)
);
}}}

or maybe on the model

{{{
CLASS company EXTENDS model_rwd {
#...
   const MAX_ROWS = 3000;
#...
}
}}}

How Can This Idea Help:
This can help prevent accidental unlimited queries, and may prevent server 
downtime because of mysql overload.

How To Implement This Idea:
SelectLimit() on model_rwd::instances_from_sql()

Original issue reported on code.google.com by albertdi...@gmail.com on 18 Jan 2015 at 10:45