miniSQL for all Monkey targets
Monkey Forums/Monkey Programming/miniSQL for all Monkey targets| 
 | ||
| Hi, I made a little Library, will be transformed in a module in a near future :) .. to work with SQL commands in the Monkey, the project page is here: https://github.com/llugato/miniSQL All things are stored in the save state, using the GfK FileSystem library (Thank's guy) in text mode. For while you can use commands like: - create table - Truncate table - Insert - Select *, count(*), fields * from table where field<1,field>2,field=10 - Import Well, I made a little example to demonstrate how the library work. Download the package and give a try. Please sugestions, errors and etc are welcome :) | 
| 
 | ||
| A little question that Mark can answer .. which the maximum size of a save state in KBs? | 
| 
 | ||
| The actual limit varies across targets. See: http://www.monkeycoder.co.nz/Community/posts.php?topic=2545 | 
| 
 | ||
| Very interesting. | 
| 
 | ||
| So... the final solution? Online saving/reading? | 
| 
 | ||
| Looks good, will you be adding any search features? | 
| 
 | ||
| Interesting indeed! Will be using this in the future! | 
| 
 | ||
| This is something that Monkey really needs!  Thanks! | 
| 
 | ||
| CooperCircle .. you can use the SELECT command for search like this: SELECT * FROM game return a string with all data stored in table "game" SELECT name,stage,points FROM score WHERE stage<10 return a string with registers that match stage<10 The return in booth cases will be a string delimited with "|" for fileds and "~n" for the registers.. You need parse the result of result query like this: 
	Local data:String[] = returnData.Split("~n")
	For Local x:Int = 0 To data.Length()-1
			local dataFields:string[] = data[x].Split("|")
			.
			your code
			.
			End			
		End
	End
For while, you can use the Import method to update the data stored.. I'll implement delete and update commands when I get some free time :) | 
| 
 | ||
| Thanks Lugato, SELECT is great, I was meaning full text search MATCH()...AGAINST , Delete and Update will be cool additions. |