byzer-lang icon indicating copy to clipboard operation
byzer-lang copied to clipboard

Include statement convert options to set statements to configure byzer script

Open allwefantasy opened this issue 3 years ago • 0 comments

Suppose we have code like following:

include lib.`github.com/allwefantasy/lib-saas-api` where 
libMirror="gitee.com" and -- if you'r in china, set proxy
alias="apis";

set userId="xxxxx";
set access_token="xxxxx";
include local.`apis.dataset.doc__v2__docs`;

The variables userId, access_token will affect the behavior of the byzer script included.

However, This way is not convenient. We can put the variables in the where/options part of include statement.

Like this:

include local.`apis.dataset.doc__v2__docs` where 
userId="xxxxx"
and access_token="xxxxx";

We also can support a parameter __action__ to control how to generate the set statements:

include local.`apis.dataset.doc__v2__docs` where 
userId="xxxxx"
and access_token="xxxxx"
and __action__="set"
;

This means we will generate normal type of set statements.

allwefantasy avatar Dec 19 '21 02:12 allwefantasy