我使用Datastax将数据插入Cassandra。但我在输出中遇到异常:
"Cassandra\Exception\InvalidArgumentException Object"
[message:protected] => Invalid statement type
[string:Exception:private] =>
[code:protected] => 16777233
为什么会发生这些问题?如何解决这些问题?
以下是一段代码:
eg:
insert into invoice (type,type_id,driver_id,driver_name,customer_phone,order_detail,fee_detail,invoice_money,status,invoice_id,update_time,create_time) values (?,?,?,?,?,?,?,?,?,?,?,?)
[args] => Array
(
[0] => insert into invoice (type,type_id,driver_id,driver_name,customer_phone,order_detail,fee_detail,invoice_money,status,invoice_id,update_time,create_time) values (?,?,?,?,?,?,?,?,?,?,?,?)
[1] => Cassandra\ExecutionOptions Object
(
)
)
表:
CREATE TABLE invoice (
type int,
type_id bigint,
driver_id text,
driver_name text,
customer_phone text,
order_detail text,
fee_detail text,
invoice_money decimal,
status int,
invoice_id bigint ,
update_time bigint,
create_time bigint,
PRIMARY KEY (type_id, type),
);
CREATE INDEX ON invoice (invoice_id);
CREATE INDEX ON invoice (customer_phone);