📄 constraints.mx
字号:
@' The contents of this file are subject to the MonetDB Public License@' Version 1.1 (the "License"); you may not use this file except in@' compliance with the License. You may obtain a copy of the License at@' http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html@'@' Software distributed under the License is distributed on an "AS IS"@' basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the@' License for the specific language governing rights and limitations@' under the License.@'@' The Original Code is the MonetDB Database System.@'@' The Initial Developer of the Original Code is CWI.@' Portions created by CWI are Copyright (C) 1997-2007 CWI.@' All Rights Reserved.@f constraints@a Niels Nes@* constraints @malmodule constraints;command emptySet(b:bat[:oid,:any_2]):voidaddress CemptySetcomment "Check if the bat is empty";@h#ifndef _CONSTRAINTS_H#define _CONSTRAINTS_H#ifdef WIN32#ifndef LIBCONSTRAINTS#define constraints_export extern __declspec(dllimport)#else#define constraints_export extern __declspec(dllexport)#endif#else#define constraints_export extern#endifconstraints_export str CemptySet(int *k, int *bid);#endif /* _CONSTRAINTS_H */@c#include "mal_config.h"#include "mal.h"#include "mal_exception.h"#include "constraints.h"str CemptySet(int *k, int *bid){ BAT *b = BATdescriptor(*bid); int cnt = 0; (void)k; if (b) cnt = BATcount(b); BBPunfix(b->batCacheid); if (cnt) throw(OPTIMIZER, "mal.assert", "emptySet"); return MAL_SUCCEED;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -