All of the following information is based on go version go1.8.3 darwin/amd64.
(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)
androiddarwin
| # 不安全 | |
| class_name = str("ClassName") | |
| obj = eval(class_name)() | |
| # 安全 | |
| class_name = str("ClassName") | |
| obj = globals()[class_name] |
| select | |
| t_x.refer_from, | |
| COALESCE(t_a.customers_count_for_refer,0) as customers_count_for_refer, | |
| COALESCE(t_b.order_count_for_first_order,0) as order_count_for_first_order, | |
| COALESCE(t_b.first_order_total_price,0) as first_order_total_price, | |
| COALESCE(t_c.customers_count_for_reg_and_order,0) as customers_count_for_reg_and_order, | |
| COALESCE(t_c.total_price_for_reg_and_order,0) as total_price_for_reg_and_order | |
| from | |
| ( | |
| select c.refer_from from customers as c where |
| select | |
| t.region_id, | |
| t.region_name, | |
| count(distinct t.order_id) as order_nums_by_store, | |
| count(distinct t.customer_id) as customer_num_by_store, | |
| sum(t.pay_from_third_part) as pay_by_store, | |
| sum(t.snap_total_price) as sales_by_store, | |
| sum(t.pay_from_balance) as balance_by_store, | |
| sum(t.cost_by_store) as cost_by_store | |
| from ( |
| class LoginForm extends CFormModel | |
| { | |
| public $username; | |
| public $password; | |
| } | |
| $form = new LoginForm(); | |
| $form->validatorList->add( | |
| CValidator::createValidator('required', $form, 'username, password') | |
| ); |