Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: SQL-Support (Was: Re: [mv] Minimate partial upload fails)



******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******

Quoting Stefan Hornburg (racke@linuxia.de):
> ******    message to minivend-users from Stefan Hornburg <racke@linuxia.de>     ******
> 
> Mike Heins <mikeh@minivend.com> writes:
> 
> 
> [...]
> 
> > > 
> > > If MiniVend does
> > > 
> > > insert into table (0, sarah, blue)
> > > 
> > > one can use Mysql's autoincrement feature.
> > 
> > And how would you prevent failure on NOT NULL conditions?
> 
> First it should read:
> insert into table (key, wife, gown) values (0, sarah, blue)
> 
> The sense of NOT NULL is set one has to supply a value for
> this column. I don't see the problem here. Please open
> my eyes.

The problem is that that is database-specific. MV requires a unique key
to do an update. If we say "insert only" this will work, providing all
of the . If we say "update or insert", which is what Minivend's partial
upload is, then it will not work as the code is.

If we added a third option, "partial import", meaning an insert-only
operation, then I could see how it would work. That would require filling
out all fields, though.

If someone writes a closure like "field_settor", which does a fast update
of a single field, that does a slice of a row, then possibly we could
do this. Otherwise we are ignoring the MV database abstraction layer
and doing something SQL-specific.

I don't understand what is wrong with writing a custom routine using SQL
to do the update if it is specific to one database, i.e. autonumbering,
which is not done the same way for all. I don't want to get into trying
to scale the tower of Babel that is diverse databases. It is not just
MV's internal ones; next release will support LDAP and MS Active
directory.

Anyone can duplicate the import_fields tag in mmtags.cfg and make it
work in their specific environment. I have not been able to figure out
a way (and I have tried) to make it work. IF someone writes some code
that works for all situations, and contributes that, I would welcome it.
I don't know how to write that code without making it SQL-specific.

-- 
Internet Robotics, 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mikeh@minivend.com>

Unix version of an Outlook-style virus:
It works on the honor system. Please forward this message to everyone
you know, and delete a bunch of your files at random.
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: