A | |
---|---|
1 | =file("/Users/test/duty.xlsx").importxls@tx() |
2 | =A1.groups(name;count(name):count) |
Such simple operation can also be written directly in SQL :
SELECT name,count(name) FROM user/test/duty.xlsx GROUP BY name
A | |
---|---|
1 | =file("/Users/test/duty.xlsx").importxls@tx() |
2 | =A1.groups(month(workday):mon,name;~.top(3):top3) |
A | |
---|---|
1 | =connect("mysql") |
2 | =A1.query@x("select * from world.countrylanguage where isofficial='T'") |
3 | [Chinese,English,French] |
4 | =A2.align@a(A3,Language) |
5 | =A4.new(A3(#):name,~.len():cnt) |
Hard coding algorithm must be compiled and packaged together with the main application
Hard coding algorithm and main application are class dependent, hard to isolate and highly coupled
After the hard coding algorithm is modified, the whole application needs to be recompiled, deployed and restarted, so it is difficult to achieve hot switching
esProc algorithm does not need to be compiled in advance
The script file of esProc is independent of the main application and can be placed externally in Java and maintained separately
No need to compile and no need to restart, hot switching is easily achieved
... Connection con = null; Class.forName(com.esproc.jdbc.InternalDriver"); con= DriverManager.getConnection("jdbc:esproc:local://"); // Calling stored procedures ,CountName is the file name of dfx st =(com. esproc.jdbc.InternalCStatement)con.prepareCall("call CountName()"); // Execute stored procedures st.execute(); // Get result set ResultSet rs = st.getResultSet(); ...