GetCurrentSelections - ์ฐจํธ ํจ์
GetCurrentSelections()๋ ์ฑ์์ ํ์ฌ ์ ํ ๋ชฉ๋ก์ ๋ฐํํฉ๋๋ค. ๊ฒ์ ์์์์ ๊ฒ์ ๋ฌธ์์ด์ ์ฌ์ฉํ์ฌ ์ ํ๋ ๊ฒฝ์ฐ GetCurrentSelections()๋ ๊ฒ์ ๋ฌธ์์ด์ ๋ฐํํฉ๋๋ค.
์ต์ ์ ์ฌ์ฉํ ๊ฒฝ์ฐ record_sep์ ์ง์ ํด์ผ ํฉ๋๋ค. ์๋ก์ด ์ค์ ์ง์ ํ๋ ค๋ฉด record_sep์ chr(13)&chr(10)์ผ๋ก ์ค์ ํฉ๋๋ค.
๋์ ์ ์ธํ ๋ชจ๋ ๋๋ ํ๋๋ฅผ ์ ์ธํ ๋ชจ๋ ๊ฐ์ ์ ํํ ๊ฒฝ์ฐ ๊ฐ๊ฐ 'NOT x,y' ๋๋ 'NOT y' ํ์์ด ์ฌ์ฉ๋ฉ๋๋ค. ๋ชจ๋ ๊ฐ์ ์ ํํ๊ณ ๋ชจ๋ ๊ฐ์ ์นด์ดํธ๊ฐ max_values๋ณด๋ค ํด ๊ฒฝ์ฐ ํ ์คํธ ALL์ด ๋ฐํ๋ฉ๋๋ค.
๊ตฌ๋ฌธ:
GetCurrentSelections ([record_sep [, tag_sep [, value_sep [, max_values [, state_name]]]]])
๋ฐํ ๋ฐ์ดํฐ ์ ํ: ๋ฌธ์์ด
์ธ์:
์ธ์ | ์ค๋ช |
---|---|
record_sep | ํ๋ ๋ ์ฝ๋ ์ฌ์ด์ ์ ๋ ฅํ ๊ตฌ๋ถ ๊ธฐํธ์ ๋๋ค. ๊ธฐ๋ณธ๊ฐ์ ์ ์ค์ ์๋ฏธํ๋ <CR><LF>์ ๋๋ค. |
tag_sep | ํ๋ ์ด๋ฆ ํ๊ทธ์ ํ๋ ๊ฐ ์ฌ์ด์ ์ ๋ ฅํ ๊ตฌ๋ถ ๊ธฐํธ์ ๋๋ค. ๊ธฐ๋ณธ๊ฐ์ ': '์ ๋๋ค. |
value_sep | ํ๋ ๊ฐ ์ฌ์ด์ ์ ๋ ฅํ ๊ตฌ๋ถ ๊ธฐํธ์ ๋๋ค. ํ๋ ๊ฐ ์ฌ์ด์ ์ ๋ ฅํ ๊ตฌ๋ถ ๊ธฐํธ์ ๋๋ค. ๊ธฐ๋ณธ๊ฐ์ ', '์ ๋๋ค. |
max_values | ๊ฐ๋ณ์ ์ผ๋ก ๋์ดํ ํ๋ ๊ฐ์ ์ต๋ ์์ ๋๋ค. ์ด๋ณด๋ค ๋ง์ ๊ฐ์ ์ ํํ๋ฉด 'x of y ๊ฐ' ํ์์ด ๋์ ์ฌ์ฉ๋ฉ๋๋ค. ๊ธฐ๋ณธ๊ฐ์ 6์ ๋๋ค. |
state_name |
ํน์ ์๊ฐํ์ ๋ํด ์ ํํ ๋์ฒด ์ํ์ ์ด๋ฆ์ ๋๋ค. state_name ์ธ์๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ์ง์ ๋ ์ํ ์ด๋ฆ๊ณผ ์ฐ๊ด๋ ์ ํ ๋ด์ฉ๋ง ๊ณ ๋ ค๋ฉ๋๋ค. ์์ธํ ๋ด์ฉ์ ๋น๊ต ๋ถ์์ ์ํ ๋์ฒด ์ํ ์ฌ์ฉ์ ์ฐธ์กฐํ์ญ์์ค. |
์ ๋ฐ ๊ฒฐ๊ณผ:
๋ค์ ์์์๋ ์๋ก ๋ค๋ฅธ ํํฐ ์ฐฝ์ ๋ก๋๋ ๋ ํ๋๋ฅผ ์ฌ์ฉํ๋ฉฐ, ํ๋๋ First name ์ด๋ฆ, ํ๋๋ Initials์ ๋๋ค.
์ | ๊ฒฐ๊ณผ |
---|---|
First name์์ John์ ์ ํํ ๊ฒ์ผ๋ก ๊ฐ์ ํฉ๋๋ค. GetCurrentSelections () | 'First name: John' |
First name์์ John ๋ฐ Peter๋ฅผ ์ ํํ ๊ฒ์ผ๋ก ๊ฐ์ ํฉ๋๋ค. GetCurrentSelections () | 'First name: John, Peter' |
First name์์ John ๋ฐ Peter๋ฅผ ์ ํํ๊ณ Initials์์ JA๋ฅผ ์ ํํ ๊ฒ์ผ๋ก ๊ฐ์ ํฉ๋๋ค. GetCurrentSelections () | 'First name: John, Peter Initials: JA' |
First name์์ John์ ์ ํํ๊ณ Initials์์ JA๋ฅผ ์ ํํ ๊ฒ์ผ๋ก ๊ฐ์ ํฉ๋๋ค. GetCurrentSelections ( chr(13)&chr(10) , ' = ' ) | 'First name = John Initials = JA' |
First name์์ Sue๋ฅผ ์ ์ธํ ๋ชจ๋ ์ด๋ฆ์ ์ ํํ๊ณ Initials์์ ์๋ฌด ๊ฒ๋ ์ ํํ์ง ์์ ๊ฒ์ผ๋ก ๊ฐ์ ํฉ๋๋ค. GetCurrentSelections (chr(13)&chr(10), '=', ',' ,3) | 'First name=NOT Sue' |
๋ฐ์ดํฐ ์ฌ์ฉ ์:
Names:
LOAD * inline [
First name|Last name|Initials|Has cellphone
John|Anderson|JA|Yes
Sue|Brown|SB|Yes
Mark|Carr|MC|No
Peter|Devonshire|PD|No
Jane|Elliot|JE|Yes
Peter|Franc|PF|Yes ] (delimiter is '|');