It show you that the sequence table can manage all tables.
// These are Schema Desgins
CREATE TABLE zz_app
(
id BIGINT UNSIGNED NOT NULL DEFAULT '0',
app_id VARCHAR(45) NOT NULL,
app_aaa VARCHAR(45) NULL,
app_bbb VARCHAR(45) NULL,
app_status_flag CHAR(1) NULL,
insert_time TIMESTAMP NOT NULL,
update_time TIMESTAMP NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE INDEX zz_app_idx1 ON zz_app(app_id);
CREATE INDEX zz_app_idx2 ON zz_app(insert_time);
CREATE TABLE zz_sequence
(
seq_name VARCHAR(30) NOT NULL,
id BIGINT UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (seq_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
----------------------------------------------------------------------
// Update sequence number into the Mysql
<insert id="updateSequece" parameterType="map">
UPDATE
zz_sequence
SET
id=LAST_INSERT_ID(id+1)
WHERE
seq_name = #{seqName}
<selectKey resultType="Long" order="AFTER">
SELECT
LAST_INSERT_ID()
</selectKey>
</insert>
// Insert a data into the Mysql
<insert id="insertApp" parameterType="map">
<selectKey keyProperty="id" resultType="Long" order="BEFORE">
SELECT
id
FROM
zz_sequence
WHERE
seq_name = #{seqName};
</selectKey>
INSERT INTO zz_app (
id,
app_id,
app_aaa,
app_bbb,
app_status_flag,
insert_time,
update_time
) VALUES (
#{id},
#{appId},
#{appAaa},
#{appBbb},
#{appStatusFlag},
now(),
now()
)
</insert>
Hi, I'm an architecture engineer and native Korean speaker.
I have started to live in Seoul in Korea.
I have been developping Abilists tool,
Please feel free to visit abilists.com
Friday, September 13, 2013
Thursday, September 12, 2013
Mysql - How to remove mysql on the mac
- sudo rm /usr/local/mysql
- sudo rm -rf /usr/local/mysql*
- sudo rm -rf /Library/StartupItems/MySQLCOM
- sudo rm -rf /Library/PreferencePanes/My*
- edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
- sudo rm -rf /Library/Receipts/mysql*
- sudo rm -rf /Library/Receipts/MySQL*
- sudo rm -rf /var/db/receipts/com.mysql.*
Objective-C - How to remove Xcode
@Remove the old Xcode
>sudo /Developer/Library/uninstall-devtools --mode=all
>sudo /Developer/Library/uninstall-devtools --mode=all
Java - Jetty to run in eclipse
・・Main
・Location
/usr/share/maven/bin/mvn
・Working Directory
1.Browser Workspace
2.Select the project name
・Arguments
-P staging
jetty:run
・Execute
$ CD /.../workspace
$ mvn jetty:run -P staging
・・Environment
@ For Debugging
MAVEN_OPTS = -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
・・Run/Debug Configure....
Then, pull up the "Run/Debug Configure...." menu item and select "Remote Java Application" and click the "New" button. Fill in the dialog by selecting your webapp project for the "Project:" field, and ensure you are using the same port number as you specified in the
Now all you need to do is to Run/External Tools and select the name of the maven tool setup you created in step 1 to start the plugin and then Run/Debug and select the name of the debug setup you setup in step2.
@pom.xml - Sample
・Location
/usr/share/maven/bin/mvn
・Working Directory
1.Browser Workspace
2.Select the project name
・Arguments
-P staging
jetty:run
・Execute
$ CD /.../workspace
$ mvn jetty:run -P staging
・・Environment
@ For Debugging
MAVEN_OPTS = -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
・・Run/Debug Configure....
Then, pull up the "Run/Debug Configure...." menu item and select "Remote Java Application" and click the "New" button. Fill in the dialog by selecting your webapp project for the "Project:" field, and ensure you are using the same port number as you specified in the
address=
property above.Now all you need to do is to Run/External Tools and select the name of the maven tool setup you created in step 1 to start the plugin and then Run/Debug and select the name of the debug setup you setup in step2.
@pom.xml - Sample
Link - Good Information
@ Service for Serverside
https://baas.io/
@Install Visual Studio Express 2012
http://ariy.kr/71
@Manager tool
https://trello.com/
@Prediction system
http://www.iaeng.org/publication/WCECS2008/WCECS2008_pp804-809.pdf
https://baas.io/
@Install Visual Studio Express 2012
http://ariy.kr/71
@Manager tool
https://trello.com/
@Prediction system
http://www.iaeng.org/publication/WCECS2008/WCECS2008_pp804-809.pdf
Monday, September 9, 2013
Link - Html5 and JavaScript
@Sample Game
http://www.gamedevacademy.org/create-a-html5-mario-style-platformer-game/
@Open Wysiwyg editor
http://www.openwebware.com
@Plug-in for javascript in Eclipse
http://www.aptana.com/products/studio3/download
@Can test the JavaScript on WEB
http://jsfiddle.net/b9ndZ/1/
@Pick up color as HTML CODE
http://html-color-codes.info/Korean/
@Tutorial
http://www.cadvance.org/?leftmenu=doc/include/total_menu.asp&mainpage=doc/java/tutorial/js_function.asp
http://www.gamedevacademy.org/create-a-html5-mario-style-platformer-game/
@Open Wysiwyg editor
http://www.openwebware.com
@Plug-in for javascript in Eclipse
http://www.aptana.com/products/studio3/download
@Can test the JavaScript on WEB
http://jsfiddle.net/b9ndZ/1/
@Pick up color as HTML CODE
http://html-color-codes.info/Korean/
@Tutorial
http://www.cadvance.org/?leftmenu=doc/include/total_menu.asp&mainpage=doc/java/tutorial/js_function.asp
Subscribe to:
Posts (Atom)