#1 2016-04-20 13:30:04

hnb
Member
Registered: 2015-06-15
Posts: 290

AddWithExclusion to create a new member, excluding selected fields

Hi ab!

I have another problem related to previous patch "Ignoring columns for DB-First" (http://synopse.info/forum/viewtopic.php?id=3252)

when table is really big (even 120 columns) very often more convenient is to exclude selected fields instead of typing all required.

Patch attached:

+AddWithExclusion to create a new member, excluding selected fields

https://drive.google.com/file/d/0B4PZhd … sp=sharing


best regards,
Maciej Izak

Offline

#2 2016-04-20 14:29:11

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,666
Website

Re: AddWithExclusion to create a new member, excluding selected fields

I would rather use the bits-oriented version of the REST commands, instead of multiplicating the (overloaded) methods.
I've added a new TSQLRecordProperties.FieldBitsFromExcludingCSV() method.
See http://synopse.info/fossil/info/9c0581f23f

Offline

#3 2016-04-21 10:20:53

hnb
Member
Registered: 2015-06-15
Posts: 290

Re: AddWithExclusion to create a new member, excluding selected fields

I like your proposition. Idea of TSQLRecordProperties.FieldBitsFromExcludingCSV() method is very useful but... In the case of "DB-First" approach for existing project AddWithExclusion is common functionality.

With your suggestion:

  GIID_Server.Add(iidrec, TSQLiid.RecordProps.FieldBitsFromExcludingCSV('a,b,c', soInsert));

looks much more complicated than:

  GIID_Server.AddWithExclusion(iidrec, 'a,b,c');

AddWithExclusion like method is used in my project very often even more often than standard Add.

Last edited by hnb (2016-04-22 07:27:58)


best regards,
Maciej Izak

Offline

Board footer

Powered by FluxBB