Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
cb929540
Commit
cb929540
authored
Jan 06, 2023
by
Cédric Le Ninivin
Committed by
Titouan Soulard
Apr 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_api_style: WIP introduce jio_api_revision table
parent
1598b834
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
429 additions
and
0 deletions
+429
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision.xml
...inTemplateItem/portal_skins/erp5_api_jio_sql_revision.xml
+26
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.py
...ns/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.py
+1
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.xml
...s/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.xml
+62
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.py
...skins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.py
+4
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.xml
...kins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.xml
+62
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.py
...ns/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.py
+25
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.xml
...s/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.xml
+62
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.sql
..._api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.sql
+6
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.xml
..._api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.xml
+34
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zDropjIOAPIRevisionTable.sql
...p5_api_jio_sql_revision/Base_zDropjIOAPIRevisionTable.sql
+1
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zDropjIOAPIRevisionTable.xml
...p5_api_jio_sql_revision/Base_zDropjIOAPIRevisionTable.xml
+34
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.sql
..._api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.sql
+6
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.xml
..._api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.xml
+28
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.sql
...jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.sql
+1
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.xml
...jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.xml
+28
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.sql
..._api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.sql
+18
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.xml
..._api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.xml
+30
-0
bt5/erp5_api_style/bt/template_skin_id_list
bt5/erp5_api_style/bt/template_skin_id_list
+1
-0
No files found.
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_api_jio_sql_revision
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.py
0 → 100644
View file @
cb929540
return
context
.
getPortalObject
().
portal_ids
.
generateNewId
(
id_group
=
repr
((
'revision'
,
"jio_api_reference"
)),
default
=
1
)
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getNewjIOAPIRevision.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getNewjIOAPIRevision
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.py
0 → 100644
View file @
cb929540
result
=
context
.
Base_zGetFromIOAPIRevisionTable
(
uid
=
context
.
getUid
())
if
result
:
return
result
[
0
].
revision
return
None
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getjIOAPIRevision
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.py
0 → 100644
View file @
cb929540
hash_method
=
context
.
getTypeBasedMethod
(
"getjIOAPIRevisionHash"
)
uid
=
context
.
getUid
()
if
not
hash_method
:
context
.
Base_zUnindexFromjIOAPIRevisionTable
(
uid
=
uid
)
return
current_hash
=
hash_method
()
if
not
current_hash
:
context
.
Base_zUnindexFromjIOAPIRevisionTable
(
uid
=
uid
)
return
stored_hash
=
None
stored_data
=
context
.
Base_zGetFromIOAPIRevisionTable
(
uid
=
uid
)
if
stored_data
:
stored_hash
=
stored_data
[
0
].
hash
if
stored_hash
==
current_hash
:
return
revision
=
context
.
Base_getNewjIOAPIRevision
()
context
.
Base_zUpdatejIOAPIRevisionTable
(
uid
=
uid
,
revision
=
revision
,
hash
=
current_hash
,
)
return
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_updatejIOAPIRevision
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.sql
0 → 100644
View file @
cb929540
CREATE
TABLE
`jio_api_revision`
(
`uid`
BIGINT
UNSIGNED
NOT
NULL
,
`revision`
varchar
(
255
)
NOT
NULL
UNIQUE
,
`hash`
varchar
(
255
),
PRIMARY
KEY
(
`uid`
)
)
ENGINE
=
InnoDB
\ No newline at end of file
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCreatejIOAPIRevisionTable.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_col
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_zCreatejIOAPIRevisionTable
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zDropjIOAPIRevisionTable.sql
0 → 100644
View file @
cb929540
DROP
TABLE
IF
EXISTS
jio_api_revision
\ No newline at end of file
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zDropjIOAPIRevisionTable.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_col
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
cmf_activity_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_zDropjIOAPIRevisionTable
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.sql
0 → 100644
View file @
cb929540
SELECT
revision
,
hash
FROM
jio_api_revision
WHERE
uid
=<
dtml
-
sqlvar
expr
=
"uid"
type
=
"int"
>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zGetFromIOAPIRevisionTable.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string
encoding=
"base64"
>
dWlkCg==
</string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
cmf_activity_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_zGetFromIOAPIRevisionTable
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.sql
0 → 100644
View file @
cb929540
DELETE
FROM
jio_api_revision
WHERE
<
dtml
-
sqltest
uid
op
=
eq
type
=
int
>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUnindexFromjIOAPIRevisionTable.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid
</string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
cmf_activity_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_zUnindexFromjIOAPIRevisionTable
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.sql
0 → 100644
View file @
cb929540
DELETE
FROM
jio_api_revision
WHERE
uid
=<
dtml
-
sqlvar
expr
=
"uid"
type
=
"int"
>
;
<
dtml
-
var
"'
\0
'"
>
INSERT
INTO
jio_api_revision
VALUES
(
<
dtml
-
sqlvar
expr
=
"uid"
type
=
"int"
>
,
<
dtml
-
sqlvar
expr
=
"revision"
type
=
"string"
optional
>
,
<
dtml
-
sqlvar
expr
=
"hash"
type
=
"string"
optional
>
)
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zUpdatejIOAPIRevisionTable.xml
0 → 100644
View file @
cb929540
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid\n
revision\n
hash
</string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
cmf_activity_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_zUpdatejIOAPIRevisionTable
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/bt/template_skin_id_list
View file @
cb929540
erp5_api_jio_sql_revision
erp5_api_style
erp5_api_style
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment