lecosson / assql

Automatically exported from code.google.com/p/assql
0 stars 0 forks source link

Add support for batch queries #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Example:

my query is : var queryAdd:String = "INSERT INTO equipe VALUES
('"+equipeId+"', '"+userDragId+"');\nSELECT equipe.equipeId,
user.userId, user.userName, user.userSurname, userProfil.userFunction
FROM equipe, user, userProfil WHERE equipeId = '"+equipeId+"' AND
equipe.equipeUserId = user.userId AND userProfil.userId =
user.userId;"; 

Original issue reported on code.google.com by macl...@gmail.com on 12 Dec 2008 at 9:25

GoogleCodeExporter commented 9 years ago
It would be really nice to run multiple queries. I'm using AsSQL for database
testing, and batch commands would be extremely useful. I need to do a bunch of
startup work before I can run my tests, such as truncating all of my tables then
populating a bunch of data for testing purposes. 

Original comment by rfkroc...@gmail.com on 18 May 2009 at 5:49

GoogleCodeExporter commented 9 years ago
Use stored procedure to do the startup work. 
http://dev.mysql.com/doc/refman/5.1/en/stored-routines.html

Original comment by ezra.r...@gmail.com on 19 May 2009 at 6:35

GoogleCodeExporter commented 9 years ago
Stored procedures are nice and everything, but they're not really portable. I 
was
able to get everything working yesterday by loading my text file, splitting it 
by
';', removing empty lines, and commented lines that start with '#', though I 
really
wish I could have all of this be automated and have AsSQL run a single query 
like
this without splitting each line into individual results. 

Original comment by rfkroc...@gmail.com on 19 May 2009 at 4:23