当前位置: 首页>>代码示例>>C++>>正文


C++ SelectQuery::setFirst方法代码示例

本文整理汇总了C++中SelectQuery::setFirst方法的典型用法代码示例。如果您正苦于以下问题:C++ SelectQuery::setFirst方法的具体用法?C++ SelectQuery::setFirst怎么用?C++ SelectQuery::setFirst使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SelectQuery的用法示例。


在下文中一共展示了SelectQuery::setFirst方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Search

		TimetableRowTableSync::SearchResult TimetableRowTableSync::Search(
			Env& env,
			optional<RegistryKeyType> timetableId
			, bool orderByTimetable
			, bool raisingOrder
			, int first
			, boost::optional<std::size_t> number,
			LinkLevel linkLevel
		){
			SelectQuery<TimetableRowTableSync> query;

			// Selection
			if (timetableId)
			{
				query.addWhereField(COL_TIMETABLE_ID, *timetableId);
			}

			// Ordering
			if (orderByTimetable)
			{
				query.addOrderField(COL_TIMETABLE_ID, raisingOrder);
				query.addOrderField(COL_RANK, raisingOrder);
			}

			// Size
			if (number)
				query.setNumber(*number + 1);
			if (first > 0)
				query.setFirst(first);

			return LoadFromQuery(query, env, linkLevel);
		}
开发者ID:Tisseo,项目名称:synthese,代码行数:32,代码来源:TimetableRowTableSync.cpp

示例2: Search

		InterSYNTHESESlaveTableSync::SearchResult InterSYNTHESESlaveTableSync::Search(
			Env& env,
			std::string name
			, int first /*= 0*/,
			boost::optional<std::size_t> number
			, bool orderByName
			, bool raisingOrder,
			LinkLevel linkLevel
		){
			SelectQuery<InterSYNTHESESlaveTableSync> query;
			if (!name.empty())
			{
				query.addWhereField(SimpleObjectFieldDefinition<Name>::FIELD.name, name, ComposedExpression::OP_LIKE);
			}
			if (orderByName)
			{
				query.addOrderField(SimpleObjectFieldDefinition<Name>::FIELD.name, raisingOrder);
			}
			if (number)
			{
				query.setNumber(*number + 1);
			}
			if (first > 0)
			{
				query.setFirst(first);
			}

			return LoadFromQuery(query, env, linkLevel);
		}
开发者ID:Tisseo,项目名称:synthese,代码行数:29,代码来源:InterSYNTHESESlaveTableSync.cpp

示例3: Search

		PublicPlaceTableSync::SearchResult PublicPlaceTableSync::Search(
			Env& env,
			optional<RegistryKeyType> cityId,
			optional<string> name,
			int first /*= 0*/,
			optional<std::size_t> number  /*= 0*/,
			LinkLevel linkLevel
		){
			SelectQuery<PublicPlaceTableSync> query;
			if(cityId)
			{
				query.addWhereField(COL_CITYID, *cityId);
			}
			if(name)
			{
				query.addWhereField(COL_NAME, *name, ComposedExpression::OP_LIKE);
			}

			if (number)
				query.setNumber(*number + 1);
			if (first > 0)
				query.setFirst(first);

			return LoadFromQuery(query, env, linkLevel);
		}
开发者ID:Tisseo,项目名称:synthese,代码行数:25,代码来源:PublicPlaceTableSync.cpp

示例4: Search

		MapSourceTableSync::SearchResult MapSourceTableSync::Search(
			util::Env& env,
			optional<string> name,
			size_t first /*= 0*/,
			optional<size_t> number /*= boost::optional<std::size_t>()*/,
			bool orderByName,
			bool raisingOrder,
			util::LinkLevel linkLevel
		){
			SelectQuery<MapSourceTableSync> query;
			if(name)
			{
				query.addWhereField(COL_NAME, *name, ComposedExpression::OP_LIKE);
			}
			if(orderByName)
			{
			 	query.addOrderField(COL_NAME, raisingOrder);
			}
			if (number)
			{
				query.setNumber(*number + 1);
			}
			if (first > 0)
			{
				query.setFirst(first);
			}

			return LoadFromQuery(query, env, linkLevel);
		}
开发者ID:Tisseo,项目名称:synthese,代码行数:29,代码来源:MapSourceTableSync.cpp

示例5: LoadFromQuery

DriverAllocationTemplateTableSync::SearchResult DriverAllocationTemplateTableSync::Search(
    util::Env& env,
    boost::gregorian::date date /*= boost::gregorian::date(not_a_date_time)*/,
    size_t first /*= 0*/,
    boost::optional<std::size_t> number /*= boost::optional<std::size_t>()*/,
    bool orderByDate /*= true*/,
    bool raisingOrder /*= true*/,
    util::LinkLevel linkLevel /*= util::UP_LINKS_LOAD_LEVEL */
) {
    SelectQuery<DriverAllocationTemplateTableSync> query;
    if (!date.is_not_a_date())
    {
        query.addWhereField(SimpleObjectFieldDefinition<Date>::FIELD.name, to_iso_extended_string(date));
    }
    if (orderByDate)
    {
        query.addOrderField(SimpleObjectFieldDefinition<Date>::FIELD.name, raisingOrder);
    }
    if (number)
    {
        query.setNumber(*number + 1);
    }
    if (first > 0)
    {
        query.setFirst(first);
    }

    return LoadFromQuery(query, env, linkLevel);
}
开发者ID:Tisseo,项目名称:synthese,代码行数:29,代码来源:DriverAllocationTemplateTableSync.cpp

示例6: Search

		TimetableRowGroupItemTableSync::SearchResult TimetableRowGroupItemTableSync::Search(
			util::Env& env,
			boost::optional<util::RegistryKeyType> timetableRowGroupId,
			boost::optional<size_t> rank,
			int first,
			boost::optional<std::size_t> number,
			bool orderByRank,
			bool raisingOrder,
			util::LinkLevel linkLevel
		){
			SelectQuery<TimetableRowGroupItemTableSync> query;
			if (timetableRowGroupId)
			{
				query.addWhereField(SimpleObjectFieldDefinition<TimetableRowGroup>::FIELD.name, *timetableRowGroupId);
			}
			if(rank)
			{
				query.addWhereField(SimpleObjectFieldDefinition<Rank>::FIELD.name, *rank);
			}
			if(orderByRank)
			{
				query.addOrderField(SimpleObjectFieldDefinition<Rank>::FIELD.name, raisingOrder);
			}
			if (number)
			{
				query.setNumber(*number + 1);
				if (first > 0)
					query.setFirst(first);
			}

			return LoadFromQuery(query, env, linkLevel);
		}
开发者ID:Tisseo,项目名称:synthese,代码行数:32,代码来源:TimetableRowGroupItemTableSync.cpp

示例7: Search

	    RoadChunkTableSync::SearchResult RoadChunkTableSync::Search(
			Env& env,
			optional<RegistryKeyType> roadId,
			int first /*= 0*/,
			boost::optional<std::size_t> number  /*= 0*/,
			LinkLevel linkLevel
		){
			SelectQuery<RoadChunkTableSync> query;
			if(roadId)
			{
				query.addWhereField(COL_ROADID, *roadId);
			}
			if (number)
				query.setNumber(*number + 1);
			if (first > 0)
				query.setFirst(first);

			return LoadFromQuery(query, env, linkLevel);
	    }
开发者ID:Tisseo,项目名称:synthese,代码行数:19,代码来源:RoadChunkTableSync.cpp

示例8: LoadFromQuery

MailingListSubscriptionTableSync::SearchResult MailingListSubscriptionTableSync::Search(
    Env& env,
    int first /*= 0*/,
    optional<size_t> number,
    bool raisingOrder,
    LinkLevel linkLevel
) {
    SelectQuery<MailingListSubscriptionTableSync> query;
    if (number)
    {
        query.setNumber(*number + 1);
    }
    if (first > 0)
    {
        query.setFirst(first);
    }

    return LoadFromQuery(query, env, linkLevel);
}
开发者ID:Tisseo,项目名称:synthese,代码行数:19,代码来源:MailingListSubscriptionTableSync.cpp

示例9: Search

		PermanentThreadTableSync::SearchResult PermanentThreadTableSync::Search(
			Env& env,
			int first /*= 0*/
			, optional<size_t> number /*= 0*/
			, bool orderByName
			, bool raisingOrder,
			LinkLevel linkLevel
		){
			SelectQuery<PermanentThreadTableSync> query;
			if (orderByName)
			{
				query.addOrderField(Name::FIELD.name, raisingOrder);
			}
			if (number)
			{
				query.setNumber(*number + 1);
			}
			if (first > 0)
			{
				query.setFirst(first);
			}

			return LoadFromQuery(query, env, linkLevel);
		}
开发者ID:Tisseo,项目名称:synthese,代码行数:24,代码来源:PermanentThreadTableSync.cpp


注:本文中的SelectQuery::setFirst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。