yes, it works
This is the same method used in the API
Andrea

Jose Blanco ha scritto:
> Andrea:
> In looking at the dspace code, it seems like I could use this SQL:
>
> SELECT getnextid(metadatavalue)
>
> And then issue and insert into metadavalue values ( ... ) using the
> metadata_value_id I get from the SELECT statement.  
>
> Will this also work?
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Andrea
> Bollini
> Sent: Thursday, April 05, 2007 3:58 AM
> To: Jose Blanco
> Cc: dspace-tech@lists.sourceforge.net
> Subject: Re: [Dspace-tech] inser/delete into the metadatavalue table
>
> Hi Jose,
> you can of course add metadata with a java script using DSpace API 
> without any problems. If you want add metadata from sql script you need 
> only to reset the metadata sequence at the end of your script.
> SELECT setval('metadatavalue_seq', max(metadata_value_id)) FROM 
> metadatavalue;
> SELECT setval('dcvalue_seq', max(dc_value_id)) FROM dcvalue;
> Of course you need also to run index-all at the end.
> Best wishes,
> Andrea
>
> PS: deleting metadata doesn't require sequence update
>
> Jose Blanco ha scritto:
>   
>> I sent this question out a few days ago, and did not hear anything. 
>>  If some one has some info on it, could you let me know.
>>
>>  
>>
>> Thanks!
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>> *From:* [EMAIL PROTECTED] 
>> [mailto:[EMAIL PROTECTED] *On Behalf Of *Jose 
>> Blanco
>> *Sent:* Monday, April 02, 2007 12:53 PM
>> *To:* dspace-tech@lists.sourceforge.net
>> *Subject:* [Dspace-tech] inser/delete into the metadatavalue table
>>
>>  
>>
>> I have a big chunk of items I would like to add and delete metadata 
>> to.  Previously I have updated the metadatavalue table when I have 
>> just wanted to do updates to certain metadata values, and then ran 
>> index-all, but I have never done inserts and deletes to this table via 
>> a script, and I want to make sure this will not cause any problems.  
>> Could some one let me know if this is safe to do?
>>
>>  
>>
>> Thanks!
>>
>>  
>>
>> Jose
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>>     
> your
>   
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> DSpace-tech mailing list
>> DSpace-tech@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>>   
>>     
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
>
>
>
>
>   


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to