too much info;select you must
SET DATABASE PARAMETER(Log command list;"277")
SET DATABASE PARAMETER(Debug log recording;2+4+8+16)
1
2
3
4
55.
too much info;select you must
SET DATABASE PARAMETER(Log command list;"277")
SET DATABASE PARAMETER(Debug log recording;2+4+8+16)SET DATABASE PARAMETER(Log command list;"277;341")
SET DATABASE PARAMETER(Debug log recording;2+4+8+16)
1
2
3
4
56.
too much info;select you must
SET DATABASE PARAMETER(Log command list;"277")
SET DATABASE PARAMETER(Debug log recording;2+4+8+16)SET DATABASE PARAMETER(Log command list;"277;341")
SET DATABASE PARAMETER(Debug log recording;2+4+8+16)
QUERY (277) および
QUERY SELECTION (341)
コマンドを監視
1
2
3
4
OB SET(form_context;"currentCountry";"France")
$ref:=Open formwindow("country_selector")
DIALOG("country_selector")
CLOSE WINDOW($ref)
$return_country:=OB Get(form_context;"currentCountry")
$evt:=Form event
Case of
: ($evt=On Load)
$currentCountry:=OB Get(form_context;"currentCountry")
ALL RECORDS([Country])
DISTINCT VALUES([Country]Continent;_continent)
If ($currentCountry="")
_continent:=1
OB SET(form_context;"onTimerMessage";"changeContinent")
SET TIMER(-1)
Else
QUERY([Country];[Country]Name=$currentCountry)
_continent:=Find in array(_continent;[Country]Continent)
QUERY([Country];[Country]Continent=_continent{_continent})
DISTINCT VALUES([Country]Name;_country)
_country:=Find in array(_country;$currentCountry)
End if
: ($evt=On Timer)
SET TIMER(0)
$onTimerMessage:=OB Get(form_context;"onTimerMessage";Is text)
OB REMOVE(form_context;"onTimerMessage")
Case of
: ($onTimerMessage="changeContinent")
QUERY([Country];[Country]Continent=_continent{_continent})
DISTINCT VALUES([Country]Name;_country)
_country:=1
End case
End case
example with a form_context
161.
OB SET(form_context;"currentCountry";"France")
$ref:=Open formwindow("country_selector")
DIALOG("country_selector")
CLOSE WINDOW($ref)
$return_country:=OB Get(form_context;"currentCountry")
$evt:=Form event
Case of
: ($evt=On Load)
$currentCountry:=OB Get(form_context;"currentCountry")
ALL RECORDS([Country])
DISTINCT VALUES([Country]Continent;_continent)
If ($currentCountry="")
_continent:=1
OB SET(form_context;"onTimerMessage";"changeContinent")
SET TIMER(-1)
Else
QUERY([Country];[Country]Name=$currentCountry)
_continent:=Find in array(_continent;[Country]Continent)
QUERY([Country];[Country]Continent=_continent{_continent})
DISTINCT VALUES([Country]Name;_country)
_country:=Find in array(_country;$currentCountry)
End if
: ($evt=On Timer)
SET TIMER(0)
$onTimerMessage:=OB Get(form_context;"onTimerMessage";Is text)
OB REMOVE(form_context;"onTimerMessage")
Case of
: ($onTimerMessage="changeContinent")
QUERY([Country];[Country]Continent=_continent{_continent})
DISTINCT VALUES([Country]Name;_country)
_country:=1
End case
End case
OB SET(form_context;"onTimerMessage";"changeContinent")
SET TIMER(-1)
example with a form_context
162.
OB SET(form_context;"currentCountry";"France")
$ref:=Open formwindow("country_selector")
DIALOG("country_selector")
CLOSE WINDOW($ref)
$return_country:=OB Get(form_context;"currentCountry")
$evt:=Form event
Case of
: ($evt=On Load)
$currentCountry:=OB Get(form_context;"currentCountry")
ALL RECORDS([Country])
DISTINCT VALUES([Country]Continent;_continent)
If ($currentCountry="")
_continent:=1
OB SET(form_context;"onTimerMessage";"changeContinent")
SET TIMER(-1)
Else
QUERY([Country];[Country]Name=$currentCountry)
_continent:=Find in array(_continent;[Country]Continent)
QUERY([Country];[Country]Continent=_continent{_continent})
DISTINCT VALUES([Country]Name;_country)
_country:=Find in array(_country;$currentCountry)
End if
: ($evt=On Timer)
SET TIMER(0)
$onTimerMessage:=OB Get(form_context;"onTimerMessage";Is text)
OB REMOVE(form_context;"onTimerMessage")
Case of
: ($onTimerMessage="changeContinent")
QUERY([Country];[Country]Continent=_continent{_continent})
DISTINCT VALUES([Country]Name;_country)
_country:=1
End case
End case
OB SET(form_context;"onTimerMessage";"changeContinent")
SET TIMER(-1)
OB SET(form_context;"currentCountry";_country{_country})
ACCEPT
example with a form_context
SET AUTOMATIC RELATIONSSET FIELD RELATION
カレントプロセス内で有効
you must unlearn what you have learned
219.
SET AUTOMATIC RELATIONSSET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
you must unlearn what you have learned
220.
SET AUTOMATIC RELATIONSSET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
you must unlearn what you have learned
221.
SET AUTOMATIC RELATIONSSET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
ストラクチャー定義の⾃動リレーションは変更できない ストラクチャー定義の⾃動リレーションも変更できる
you must unlearn what you have learned
222.
SET AUTOMATIC RELATIONSSET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
ストラクチャー定義の⾃動リレーションは変更できない ストラクチャー定義の⾃動リレーションも変更できる
"True" はリレーションをロックする;
その場合 SET FIELD RELATION
は無視されてしまう
副作⽤なし
you must unlearn what you have learned
223.
SET AUTOMATIC RELATIONSSET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
ストラクチャー定義の⾃動リレーションは変更できない ストラクチャー定義の⾃動リレーションも変更できる
"True" はリレーションをロックする;
その場合 SET FIELD RELATION
は無視されてしまう
副作⽤なし
!
you must unlearn what you have learned
224.
SET AUTOMATIC RELATIONSSET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
ストラクチャー定義の⾃動リレーションは変更できない ストラクチャー定義の⾃動リレーションも変更できる
"True" はリレーションをロックする;
その場合 SET FIELD RELATION
は無視されてしまう
副作⽤なし
!
互換性のために残されている 効率⾯で優れている
you must unlearn what you have learned
QUERY BY FORMULAQUERY BY FORMULA
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
227.
QUERY BY FORMULAQUERY BY FORMULA
インデックスを使⽤しないシーケンシャル検索 インデックス検索
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
228.
QUERY BY FORMULAQUERY BY FORMULA
インデックスを使⽤しないシーケンシャル検索 インデックス検索
サーバー側でフォーミュラを評価クライアント側でフォーミュラ式を評価
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
229.
QUERY BY FORMULAQUERY BY FORMULA
インデックスを使⽤しないシーケンシャル検索 インデックス検索
サーバー側でフォーミュラを評価
⾃動的にJOINを実⾏
クライアント側でフォーミュラ式を評価
レコード1件ずつクライアントに転送
JOINを定義して使⽤
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
230.
QUERY BY FORMULAQUERY BY FORMULA
インデックスを使⽤しないシーケンシャル検索 インデックス検索
サーバー側でフォーミュラを評価
⾃動的にJOINを実⾏
クライアント側でフォーミュラ式を評価
レコード1件ずつクライアントに転送
JOINを定義して使⽤
以前のアドバイス :
利⽤は慎重に,できる限りQUERY
SELECTIONで対応
現在のアドバイス :
v11の主要強化ポイントのひとつ
積極的に使⽤するべき!
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
EXECUTE ON CLIENTEXECUTE ON CLIENT
REGISTER CLIENT(name;period) REGISTER CLIENT(name)
you must unlearn what you have learned
233.
EXECUTE ON CLIENTEXECUTE ON CLIENT
REGISTER CLIENT(name;period) REGISTER CLIENT(name)
登録後,クライアントは定期的に,デ
フォルトでは2秒毎に,サーバー
あるいは別のクライアントから
呼び出されているか問い合わせる
サーバーは必要なときに実⾏リクエスト
を直接クライアントに送信する
you must unlearn what you have learned
234.
EXECUTE ON CLIENTEXECUTE ON CLIENT
REGISTER CLIENT(name;period) REGISTER CLIENT(name)
登録後,クライアントは定期的に,デ
フォルトでは2秒毎に,サーバー
あるいは別のクライアントから
呼び出されているか問い合わせる
サーバーは必要なときに実⾏リクエスト
を直接クライアントに送信する
PULLモード PUSHモード
you must unlearn what you have learned
235.
EXECUTE ON CLIENTEXECUTE ON CLIENT
REGISTER CLIENT(name;period) REGISTER CLIENT(name)
登録後,クライアントは定期的に,デ
フォルトでは2秒毎に,サーバー
あるいは別のクライアントから
呼び出されているか問い合わせる
サーバーは必要なときに実⾏リクエスト
を直接クライアントに送信する
PULLモード PUSHモード
⼤量リクエストの可能性 必要最低限のリクエスト数
you must unlearn what you have learned
$firstName:=[Customer]FirstName
$lastName:=[Customer]LastName
$birthday:=[Customer]Birthday
PUSH RECORD([Customer])
QUERY([Customer];[Customer]firstName=$firstName;*)
QUERY([Customer];[Customer]lastName=$lastName;*)
QUERY([Customer];[Customer]Birthday=$birthday)
$nb:=Records inselection([Customer])
POP RECORD([Customer])
If ($nb=0)
//do something
End if
$firstName:=[Customer]FirstName
$lastName:=[Customer]LastName
$birthday:=[Customer]Birthday
SET QUERY DESTINATION(Into variable;$nb)
QUERY([Customer];[Customer]FirstName=$firstName;*)
QUERY([Customer];[Customer]LastName=$lastName;*)
QUERY([Customer];[Customer]Birthday=$birthday)
SET QUERY DESTINATION(Into current selection)
If ($nb=0)
//do something
End if
PUSH / POP ロジックはとても⾼価な処理
セレクション変更・クエリ・メモリの読み書き…
$firstName:=[Customer]FirstName
$lastName:=[Customer]LastName
$birthday:=[Customer]Birthday
SET QUERY LIMIT(1)
SET QUERY DESTINATION(Into variable;$nb)
QUERY([Customer];[Customer]FirstName=$firstName;*)
QUERY([Customer];[Customer]LastName=$lastName;*)
QUERY([Customer];[Customer]Birthday=$birthday)
SET QUERY DESTINATION(Into current selection)
SET QUERY LIMIT(0)
If ($nb=0)
//do something
End if
SET QUERY DESTINATION
カレントセレクション・レコードを変更せずにクエリを実⾏
at the end, house of cards falls
253.
$firstName:=[Customer]FirstName
$lastName:=[Customer]LastName
$birthday:=[Customer]Birthday
PUSH RECORD([Customer])
QUERY([Customer];[Customer]firstName=$firstName;*)
QUERY([Customer];[Customer]lastName=$lastName;*)
QUERY([Customer];[Customer]Birthday=$birthday)
$nb:=Records inselection([Customer])
POP RECORD([Customer])
If ($nb=0)
//do something
End if
$firstName:=[Customer]FirstName
$lastName:=[Customer]LastName
$birthday:=[Customer]Birthday
SET QUERY DESTINATION(Into variable;$nb)
QUERY([Customer];[Customer]FirstName=$firstName;*)
QUERY([Customer];[Customer]LastName=$lastName;*)
QUERY([Customer];[Customer]Birthday=$birthday)
SET QUERY DESTINATION(Into current selection)
If ($nb=0)
//do something
End if
PUSH / POP ロジックはとても⾼価な処理
セレクション変更・クエリ・メモリの読み書き…
$firstName:=[Customer]FirstName
$lastName:=[Customer]LastName
$birthday:=[Customer]Birthday
SET QUERY LIMIT(1)
SET QUERY DESTINATION(Into variable;$nb)
QUERY([Customer];[Customer]FirstName=$firstName;*)
QUERY([Customer];[Customer]LastName=$lastName;*)
QUERY([Customer];[Customer]Birthday=$birthday)
SET QUERY DESTINATION(Into current selection)
SET QUERY LIMIT(0)
If ($nb=0)
//do something
End if
SET QUERY LIMIT
0 でリミットを解除
SET QUERY DESTINATION
カレントセレクション・レコードを変更せずにクエリを実⾏
at the end, house of cards falls
While (Semaphore("parameters"))
IDLE
End while
APPENDTO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500))
IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
the sounds of silence, respect you must
276.
While (Semaphore("parameters"))
IDLE
End while
APPENDTO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500))
IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
"$parameters" はローカルセマフォ
the sounds of silence, respect you must
277.
While (Semaphore("parameters"))
IDLE
End while
APPENDTO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500))
IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
"$parameters" はローカルセマフォクライアント側で管理
the sounds of silence, respect you must
278.
While (Semaphore("parameters"))
IDLE
End while
APPENDTO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500))
IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
"$parameters" はローカルセマフォクライアント側で管理
セマフォがセットされるまで500tick待機する
the sounds of silence, respect you must
//ReadWrite(->table)
C_POINTER($1;$table)
$table:=$1
If (Read onlystate($table->))
READ WRITE($table->)
End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,
READ WRITEを実⾏する前に
状態を調べることは有⽤だった
v11以降,リクエストがサーバーに
送信されるまでREAD WRITEは
保留されるようになったのでこれで良い
kill good old generic, you can
298.
//ReadWrite(->table)
C_POINTER($1;$table)
$table:=$1
If (Read onlystate($table->))
READ WRITE($table->)
End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,
READ WRITEを実⾏する前に
状態を調べることは有⽤だった
v11以降,リクエストがサーバーに
送信されるまでREAD WRITEは
保留されるようになったのでこれで良い
毎回のアップグレード後に必ずチェックするべき項⽬のひとつ
kill good old generic, you can
299.
//ReadWrite(->table)
C_POINTER($1;$table)
$table:=$1
If (Read onlystate($table->))
READ WRITE($table->)
End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,
READ WRITEを実⾏する前に
状態を調べることは有⽤だった
v11以降,リクエストがサーバーに
送信されるまでREAD WRITEは
保留されるようになったのでこれで良い
毎回のアップグレード後に必ずチェックするべき項⽬のひとつ
何年も開いていない汎⽤コードは腐った⾷品と同じ: 捨てるか運を天に任せるか
kill good old generic, you can
300.
//ReadWrite(->table)
C_POINTER($1;$table)
$table:=$1
If (Read onlystate($table->))
READ WRITE($table->)
End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,
READ WRITEを実⾏する前に
状態を調べることは有⽤だった
v11以降,リクエストがサーバーに
送信されるまでREAD WRITEは
保留されるようになったのでこれで良い
毎回のアップグレード後に必ずチェックするべき項⽬のひとつ
何年も開いていない汎⽤コードは腐った⾷品と同じ: 捨てるか運を天に任せるか
汎⽤コードがまとめられたコンポーネントも忘れずにチェックすること
kill good old generic, you can
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
brothers but not twins …
311.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
brothers but not twins …
312.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
"Execute on server"
メソッドに引数を渡せば良い brothers but not twins …
313.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
"Execute on server"
メソッドに引数を渡せば良い
1回にまとめられる
brothers but not twins …
314.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
"Execute on server"
メソッドに引数を渡せば良い
1回にまとめられる
"息継ぎ"する時間がない
brothers but not twins …
315.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
"Execute on server"
メソッドに引数を渡せば良い
1回にまとめられる
"息継ぎ"する時間がない
パラメーターをコマンドに直接
渡すことは避けたほうが良い
brothers but not twins …
316.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
//myReallyOptimizedMethodSrv
$customer_ID:=$1
// 結果を計算する
$result:=....
$0:=$result
brothers but not twins …
317.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
//myReallyOptimizedMethodSrv
$customer_ID:=$1
// 結果を計算する
$result:=....
$0:=$result
brothers but not twins …
318.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
//myReallyOptimizedMethodSrv
$customer_ID:=$1
// 結果を計算する
$result:=....
$0:=$result
brothers but not twins …
319.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
//myReallyOptimizedMethodSrv
$customer_ID:=$1
// 結果を計算する
$result:=....
$0:=$result
brothers but not twins …
320.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
//myReallyOptimizedMethodSrv
$customer_ID:=$1
// 結果を計算する
$result:=....
$0:=$result
brothers but not twins …
321.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
//myReallyOptimizedMethodSrv
$customer_ID:=$1
// 結果を計算する
$result:=....
$0:=$result
"Execute on server"コマンドは⾮同期コール
brothers but not twins …
322.
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv")
SETPROCESS VARIABLE($process_srv_id;customer_ID;$1)
$calculation_launch:=True
SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch)
$calculation_finished:=False
Repeat
GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished)
GET PROCESS VARIABLE($process_srv_id;Result;$Result)
Until ($calculation_finished)
$calculation_kill:=true
SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv
calculation_launch:=False
calculation_finished:=False
calculation_kill:=False
customer_ID:=0
while( not(calculation_launch))
DELAY PROCESS(Current process;1)
End while
// 結果を計算する
Result:=....
calculation_finished:=True
While (Not(calculation_kill))
DELAY PROCESS(Current process;1)
End while
//myReallyOptimizedMethodSrv
$customer_ID:=$1
// 結果を計算する
$result:=....
$0:=$result
"Execute on server"コマンドは⾮同期コール
"サーバー上で実⾏"メソッド属性は同期コール
brothers but not twins …
DESCRIBE QUERY EXECUTION(True)
QUERYBY FORMULA([Flight];([Airport]IATA_AirportCode="SFO")
& ([Flight]UUID_Line=[Line]UUID) & ([Line]UUID_Airport_To=[Airport]UUID))
$path:=Get last query path(Description in text format)
SET TEXT TO PASTEBOARD($path)
DESCRIBE QUERY EXECUTION(False)
if no mistake have you made, yet losing you are …
336.
DESCRIBE QUERY EXECUTION(True)
QUERYBY FORMULA([Flight];([Airport]IATA_AirportCode="SFO")
& ([Flight]UUID_Line=[Line]UUID) & ([Line]UUID_Airport_To=[Airport]UUID))
$path:=Get last query path(Description in text format)
SET TEXT TO PASTEBOARD($path)
DESCRIBE QUERY EXECUTION(False)
クエリプランとクエリパスで視点をエンジンルーム内に移動
if no mistake have you made, yet losing you are …
337.
DESCRIBE QUERY EXECUTION(True)
QUERYBY FORMULA([Flight];([Airport]IATA_AirportCode="SFO")
& ([Flight]UUID_Line=[Line]UUID) & ([Line]UUID_Airport_To=[Airport]UUID))
$path:=Get last query path(Description in text format)
SET TEXT TO PASTEBOARD($path)
DESCRIBE QUERY EXECUTION(False)
クエリプランとクエリパスで視点をエンジンルーム内に移動
優れたクエリを書くため,時には直感を働かせることも必要
if no mistake have you made, yet losing you are …
$id_progress:=Progress New
Progress SETBUTTON ENABLED ($id_progress;True)
Progress SET TITLE ($id_progress;"Update customers";0;"";True)
ALL RECORDS([Customer])
$j:=0
$nb:=Records in table([Customer])
While (Not(End selection([Customer]))) & (Not(Progress Stopped ($id_progress)))
$j:=$j+1
Progress SET PROGRESS ($id_progress;$j/$nb;[Customer]name)
/// ...
NEXT RECORD([Customer])
End while
Progress QUIT ($id_progress)
Mr Smith
VAT rate
4D helps your progress
351.
$id_progress:=Progress New
Progress SETBUTTON ENABLED ($id_progress;True)
Progress SET TITLE ($id_progress;"Update customers";0;"";True)
ALL RECORDS([Customer])
$j:=0
$nb:=Records in table([Customer])
While (Not(End selection([Customer]))) & (Not(Progress Stopped ($id_progress)))
$j:=$j+1
Progress SET PROGRESS ($id_progress;$j/$nb;[Customer]name)
/// ...
NEXT RECORD([Customer])
End while
Progress QUIT ($id_progress)
Mr Smith
VAT rate
$id_progress:=Progress New
Progress SET BUTTON ENABLED ($id_progress;True)
Progress SET TITLE ($id_progress;"Apply new parameter";0;"";True)
ALL RECORDS([Param])
$j:=0
$nb:=Records in table([Param])
While (Not(End selection([Param]))) & (Not(Progress Stopped ($id_progress)))
$j:=$j+1
Progress SET PROGRESS ($id_progress;$j/$nb;[Param]name)
/// ...
NEXT RECORD([Param])
End while
Progress QUIT ($id_progress)
4D helps your progress
352.
$id_progress:=Progress New
Progress SETBUTTON ENABLED ($id_progress;True)
Progress SET TITLE ($id_progress;"Update customers";0;"";True)
ALL RECORDS([Customer])
$j:=0
$nb:=Records in table([Customer])
While (Not(End selection([Customer]))) & (Not(Progress Stopped ($id_progress)))
$j:=$j+1
Progress SET PROGRESS ($id_progress;$j/$nb;[Customer]name)
/// ...
NEXT RECORD([Customer])
End while
Progress QUIT ($id_progress)
Mr Smith
VAT rate
$id_progress:=Progress New
Progress SET BUTTON ENABLED ($id_progress;True)
Progress SET TITLE ($id_progress;"Apply new parameter";0;"";True)
ALL RECORDS([Param])
$j:=0
$nb:=Records in table([Param])
While (Not(End selection([Param]))) & (Not(Progress Stopped ($id_progress)))
$j:=$j+1
Progress SET PROGRESS ($id_progress;$j/$nb;[Param]name)
/// ...
NEXT RECORD([Param])
End while
Progress QUIT ($id_progress)
おすすめ:
ループ10回毎に
メソッドをコールする
4D helps your progress
Antoine de SaintExupéry
La perfection est atteinte, non pas lorsqu'il n'y a plus
rien à ajouter, mais lorsqu'il n'y a plus rien à retirer.
Wind, Sand and Stars (1939)