Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new feature of Schema( "") to open default.yaml #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shewer
Copy link
Contributor

@shewer shewer commented May 4, 2024

Schema('') == Schema('.default')

-- 取得 default.yaml:/schema_list 所有 schema_id
local  schema= Schema('')
local size = schema.config:get_list('schema_list').size
local schemas_id={}
for i = 0, size-1 do 
   local path = ("schema_list/@%d/schema"):format(i)
   table.insert(schema_id ,  schema.config:get_string( path ) )
end
print(  table.concat(schemas_id, "\n") )
---

Schema('')  ==  Schema('.default') 
```lua
-- 取得 default.yaml:/schema_list 所有 schema_id
local  schema= Schema('')
local size = schema.config:get_list('schema_list').size
local schemas_id={}
for i = 0, size-1 do 
   local path = ("schema_list/@%d/schema"):format(i)
   table.insert(schema_id ,  schema.config:get_string( path ) )
end
print(  table.concat(schemas_id, "\n") )
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant