Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » SqlExp and LIMIT
Re: SqlExp and LIMIT [message #2941 is a reply to message #2934] Mon, 01 May 2006 03:06 Go to previous messageGo to previous message
mezise is currently offline  mezise
Messages: 54
Registered: April 2006
Member
luzr wrote on Sun, 30 April 2006 17:01

Not yet. To put it straight, so far SqlExp was designed for Oracle and will need further tweaks for other SQL engines.

Mirek


OFFSET-LIMIT clause is quite necessary in MySQL, SQLite and PostgreSQL.
So, could this code be put into next dev5 release?

into Sqlexp.h:
	SqlSet&          Limit(const unsigned int limit);
	SqlSet&          Limit(const unsigned int offset, const unsigned int limit);
	SqlSet&          Offset(const unsigned int offset);


into Sqlexp.cpp:
SqlSet& SqlSet::Limit(const unsigned int limit) {
	text << " limit " << limit;
	return *this;
}

SqlSet& SqlSet::Limit(const unsigned int offset, const unsigned int limit) {
	text << " limit " << offset << ", " << limit;
	return *this;
}

SqlSet& SqlSet::Offset(const unsigned int offset) {
	text << " offset " << offset;
	return *this;
}


After OrderBy it would be the right place.

Michal
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: SqlArray and checkboxes
Next Topic: SQL Insert Statement without a value[SOLVED]
Goto Forum:
  


Current Time: Thu Aug 14 03:07:26 CEST 2025

Total time taken to generate the page: 0.08613 seconds