You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
just tried to use cop_seq in select (see the attached file), and it is not working at all.
The review of SqlUtil says that cop_seq is created with make_cop, which means it results in a hash
(
"cop" : "seq",
"column" : "<sequence_name>", # !!! mind the column key here
)
as such, it wents down to SqlUtil.qm line 11359, where doColumnOperatorIntern is called (with the aforementioned hash as the 1st arg). I.e. the overload of doColumnOperatorIntern on line 11627 is called, where one of the parameters passed down is
since "column" is filled with the sequence name, getColumnExpressionIntern is really called, assuming its argument is a column name, and produces an exception (you can try yourself with the attached file).
I'd say the "column" key is bad here and should be renamed, but still, IF it is modified, it would throw a few lines below (11637), where it would find out that "seq" is missing from DefaultCopMap (as well as other operators).
So I took a suspicion that cop_seq cannot work at all, and voila - it is really not used anywhere in the rossini code.
…guments to those functions for specifying the column alias, added the "withalias" column option flag to allow for column operators to more easily define column aliases, added tests & updated relnotes
zk.q:
%new-style
%requires SqlUtil
DatasourcePool dsstage("pgsql:staging/staging@staging");
on_success dsstage.commit();
on_error dsstage.rollback();
SqlUtil::Table t(dsstage, "h3g_it_aruba_emails_iface");
t.select(("columns" : (
cop_seq("h3g_it_transaction_id_s"),
#"target_system",
#"source_system",
#cop_value("IT_OIC_INV_MAIL_FDB"),
#cop_value("I"),
#11,
#12,
#"message_id",
#cop_value("Success"),
#cop_value("2016-01-01"),
#"pec_sender",
#"pec_sender_pwd",
),
"where" : (
"i_sepl_updated_id" : 10,
"message_type" : "IT_OIC_MAIL",
"message_id" : "1",)));
The text was updated successfully, but these errors were encountered: