Changeset: 419c11d5bfa7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=419c11d5bfa7 Modified Files: Branch: default Log Message:
Merge with Jun2010 branch. diffs (50 lines): diff -r 3b40c80c9172 -r 419c11d5bfa7 MonetDB5/src/modules/atoms/str.mx --- a/MonetDB5/src/modules/atoms/str.mx Tue Jul 27 13:44:44 2010 +0200 +++ b/MonetDB5/src/modules/atoms/str.mx Wed Jul 28 09:53:58 2010 +0200 @@ -295,6 +295,7 @@ str_export int strConcat(str *res, str s, ptr val, int t); str_export int strLength(int *res, str s); +str_export int strSQLLength(int *res, str s); str_export int strBytes(int *res, str s); str_export int strTail(str *res, str s, int *offset); str_export int strSubString(str *res, str s, int *offset, int *length); @@ -2183,6 +2184,16 @@ *Res = res; return GDK_SUCCEED; } +int +strSQLLength(int *res, str s) +{ + str r = NULL; + strRtrim(&r, s); + strLength(res, r); + GDKfree(r); + return GDK_SUCCEED; +} + @ @- Wrappers Here you find the wrappers around the version 4 library code diff -r 3b40c80c9172 -r 419c11d5bfa7 MonetDB5/src/modules/kernel/batstr.mx --- a/MonetDB5/src/modules/kernel/batstr.mx Tue Jul 27 13:44:44 2010 +0200 +++ b/MonetDB5/src/modules/kernel/batstr.mx Wed Jul 28 09:53:58 2010 +0200 @@ -37,6 +37,10 @@ address STRbatLength comment "Return the length of a string."; +command batstr.stringlength( s:bat[:oid,:str] ) :bat[:oid,:int] +address STRbatstringLength +comment "Return the length of a right trimed string."; + command batstr.nbytes( s:bat[:oid,:str] ) :bat[:oid,:int] address STRbatBytes comment "Return the string length in bytes."; @@ -264,6 +268,7 @@ @c @:BATint(Length,strLength,str)@ +@:BATint(stringLength,strSQLLength,str)@ @:BATint(Bytes,strBytes,str)@ @= BATstr _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list